XWININFO(1)

๐Ÿ“ฆ
version 7.7+7build1 ยท 3 versions
, in alpine 3.24, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐ŸŽ€ NAME ๐ŸŽ€

okay so the manual name is xwininfo and it's a General Commands Manual page (section 1) ๐Ÿ’… xwininfo is a window information utility for X โœจ

๐Ÿ’– SYNOPSIS ๐Ÿ’–

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

โœจ DESCRIPTION โœจ

bestie, xwininfo is a utility for showing you info about windows ๐ŸชŸ What you get back depends on which options you pick. If you don't choose any options at all, it assumes -stats ๐Ÿฅฐ

you've got a few ways to pick your target window. You can click any mouse button inside the window you want ๐Ÿ–ฑ๏ธ, or you can hand it a window id on the command line with -id. Or, if ids aren't your thing, the -name option lets you pick a window by its name ๐Ÿซถ And there's a special -root option that instantly gets you info on the screen's root window ๐ŸŒˆ

๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

  • -help โ€” prints out the Usage: command syntax summary ๐Ÿ“‹
  • -id wdid โ€” lets you name a target window wdid on the command line so you don't have to use the mouse. This is super useful when you're debugging X applications where the target window isn't mapped to the screen, or where using the mouse might be impossible or mess with the app ๐Ÿ™ˆ
  • -name wdname โ€” lets you say the window called wdname is your target on the command line, instead of clicking it with the mouse ๐Ÿ’…
  • -root โ€” makes X's root window your target ๐ŸŒธ This comes in clutch when the root window is totally covered up by other stuff
  • -int โ€” shows all X window ids as integer values. The default is hexadecimal values, so this is for when you want decimal vibes instead ๐Ÿ”ข
  • -children โ€” shows the ids and names of the selected window's root, parent, and children windows ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง
  • -tree โ€” basically -children, but it shows all the children recursively, like a whole family tree ๐ŸŒณ
  • -stats โ€” shows a bunch of attributes about where the selected window is and how it looks โœจ That includes its location, width and height, depth, border width, visual id and class, colormap id if it has one, map state, backing-store hint, and the location of its corners ๐Ÿ“
  • -bits โ€” shows attributes about the window's raw bits and how it gets stored ๐Ÿงš You'll see its bit gravity, window gravity, backing-store hint, backing-planes value, backing pixel, and whether or not save-under is set
  • -events โ€” shows the selected window's event masks ๐Ÿ“ฎ You get both the mask of events some client wants, and the mask of events that are not supposed to propagate
  • -size โ€” shows the selected window's sizing hints ๐Ÿ“ For both the normal size hints and the zoom size hints, you'll see: the user supplied location if there is one; the program supplied location if there is one; the user supplied size if there is one; the program supplied size if there is one; the minimum size if there is one; the maximum size if there is one; the resize increments if there are any; and the minimum and maximum aspect ratios if there are any ๐Ÿซง
  • -wm โ€” shows the selected window's window manager hints ๐Ÿช„ This might include whether or not the app accepts input, what the window's icon window # and name are, where the icon should go, and what the window's initial state should be
  • -shape โ€” shows the selected window's window and border shape extents ๐Ÿฆ‹
  • -frame โ€” makes window manager frames count when you're manually selecting windows ๐Ÿ–ผ๏ธ
  • -metric โ€” shows all the individual heights, widths, and x and y positions in millimeters too, along with the pixel count. This is based on what the server thinks the resolution is ๐Ÿ“ Geometry specs written in +x+y form stay exactly the same
  • -english โ€” shows all the individual heights, widths, and x and y positions in inches (and feet, yards, and miles if needed) along with the pixel count ๐Ÿ‡บ๐Ÿ‡ธ -metric and -english can both be turned on at the same time, so go wild ๐ŸŒˆ
  • -all โ€” the lazy-girl shortcut to ask for all the info possible ๐Ÿ’œ
  • -d, -display host:dpy โ€” lets you pick which server to connect to. See X(7) for more deets ๐Ÿ–ฅ๏ธ
  • -version โ€” prints out xwininfo's version info and then exits ๐Ÿ”–

๐Ÿง EXAMPLE ๐Ÿง

okay so this is what a sample summary looks like when you don't pass any options:

xwininfo: Window id: 0x60000f "xterm"

  Absolute upper-left X: 2
  Absolute upper-left Y: 85
  Relative upper-left X:  0
  Relative upper-left Y:  25
  Width: 579
  Height: 316
  Depth: 8
  Visual: 0x1e
  Visual Class: PseudoColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x27 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +2+85  -699+85  -699-623  +2-623
  -geometry 80x24+0+58

๐ŸŒท ENVIRONMENT ๐ŸŒท

  • DISPLAY โ€” this is how it finds the default host and display number ๐Ÿซถ

๐Ÿ”— SEE ALSO ๐Ÿ”—

X(7), xprop(1), xdpyinfo(1), xdriinfo(1), xvinfo(1), glxinfo(1) ๐Ÿ’ซ

๐Ÿ™ˆ BUGS ๐Ÿ™ˆ

using -stats -bits shows some redundant information, so you'll see some repeats ๐Ÿ˜ญ
the -geometry string that gets displayed has to make some assumptions about the window's border width and how the application and window manager behave. Because of that, the location it gives isn't always correct ๐Ÿ’€

๐Ÿ‘ฉโ€๐Ÿ’ป AUTHOR ๐Ÿ‘ฉโ€๐Ÿ’ป

Mark Lillibridge, MIT Project Athena ๐ŸŽ“


bestie that's the whole page ๐Ÿซถ It's the X Version 11 manual, xwininfo 1.1.6, XWININFO(1) ๐ŸŒˆ now go be a window detective ๐Ÿ•ต๏ธโ€โ™€๏ธโœจ