LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

xwininfo

Display X11 window information

TLDR

Get window info by clicking on it
$ xwininfo
copy
Get root window info
$ xwininfo -root
copy
Get all info for a window selected by clicking
$ xwininfo -all
copy
Get by window ID
$ xwininfo -id [0x12345]
copy
Get by window name
$ xwininfo -name "[Window Name]"
copy
Show the full window tree recursively from root
$ xwininfo -root -tree
copy
Display window IDs as integers instead of hexadecimal
$ xwininfo -int
copy
Show window manager hints for a specific window
$ xwininfo -wm -id [0x12345]
copy

SYNOPSIS

xwininfo [-help] [-id wid] [-root] [-name wdname] [-int] [-children] [-tree] [-stats] [-bits] [-events] [-size] [-wm] [-shape] [-frame] [-all] [-english] [-metric] [-display host:dpy] [-version]

DESCRIPTION

xwininfo displays detailed information about X11 windows, including geometry (size and position), window ID, depth, visual class, and colormap. When run without arguments, it presents a crosshair cursor for interactive window selection by clicking.Specific windows can be targeted using -id for a window ID, -name for a window title, or -root for the root window. The -tree option displays the complete window hierarchy, showing how windows are nested within each other. If no information option is specified, -stats is assumed. The tool is commonly used for debugging window managers and scripting X11 window operations.

PARAMETERS

-root

Select the root window as the target without using the cursor.
-id wid
Specify the target window by its X window ID.
-name wdname
Specify the target window by name.
-int
Display all X window IDs as integer values. Default is hexadecimal.
-children
Display the root, parent, and children windows' IDs and names.
-tree
Like -children, but display all children recursively.
-stats
Display location and appearance attributes including size, position, depth, and visual info. This is the default if no options are specified.
-bits
Display bit gravity, window gravity, backing-store, and save-under attributes.
-events
Display the selected window's event masks.
-size
Display sizing hints including minimum, maximum, and resize increment sizes.
-wm
Display window manager hints including input model, icon info, and initial state.
-shape
Display the window and border shape extents.
-frame
Consider window manager frames when manually selecting windows.
-metric
Display dimensions in millimeters as well as number of pixels.
-english
Display dimensions in inches as well as number of pixels.
-all
Show all available information.
-display host:dpy
Specify the X server to connect to.
-version
Print version information and exit.

CAVEATS

X11 only. Does not work on Wayland. Part of the x11-utils package (or xorg-xwininfo on Arch).

HISTORY

xwininfo is a standard X11 utility for displaying information about windows.

SEE ALSO

xprop(1), xdotool(1), xlsclients(1), xdpyinfo(1), xkill(1), wmctrl(1)

Copied to clipboard
Kai