Skip to content

X11-good-tools/xwincat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xwincat

X11 window position logger with a simple output format: One window position change per line on stdout.

Window cats. The name is referringto the UNIX cat program though.
Image credit: Pixabay user 123090

Nice for drawing some sort of composited overlay, or for fun statistics.

Format

On startup, xwincat prints a line

screen <width> <height>

where the integers <width> and <height> represent the dimensions of the first screen it found.

Whenever a window changes position or size, it prints a line

window <window_id> <x> <y> <width> <height>

where the fields are again pretty self-explanitory. The (x,y) position is from top-left of the screen.

Popup windows (with the override_redirect-flag set) are ignored by default, but can be enabled if you want them with the -popups flag.

If you passed -time, an epoch timestamp is additionally printed at the end of window lines.

Compilation

Just make.

Don't have clang? Edit the makefile to use gcc.

Usage

Flags you can pass (all optional):

  • -display <display>: set target X display (default :0)
  • -time: also append epoch timestamps (default: don't)
  • -popup: also print popup window changes (default: don't)
  • -help: print usage hints and exit

Interrupt signal (C-c) to end.

Related programs

If you want to similarly log what keys are pressed, you might like xkbcat.

License

ISC.

About

simple X11 window position logger

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.3%
  • Makefile 3.7%