Docu review done: Wed 31 Jul 2024 02:41:09 PM CEST
x11-utils
Table of Content
General
An X client is a program that interfaces with an X server (almost always via the X libraries), and thus with some input and output hardware like a graphics card, monitor, keyboard, and pointing device (such as a mouse).
This package provides a miscellaneous assortment of X utilities that ship with the X Window System, including:
appres
,editres
,listres
andviewres
: which query the X resource databaseluit
: a filter that can be run between an arbitrary application and a UTF-8 terminal emulatorxdpyinfo
: a display information utility for Xxdriinfo
: query configuration information of DRI driversxev
: an X event displayerxfd
: a tool that displays all the glyphs in a given X fontxfontsel
: a tool for browsing and selecting X fontsxkill
: a tool for terminating misbehaving X clientsxlsatoms
: which lists interned atoms defined on an X serverxlsclients
: which lists client applications running on an X displayxlsfonts
: a server font list displayerxmessage
: a tool to display message or dialog boxesxprop
: a property displayer for Xxvinfo
: an Xv extension information utility for Xxwininfo
: a window information utility for X
The editres and viewres programs use bitmap images provided by the xbitmaps package. The luit program requires locale information from the libx11-data package.
Installation
$ apt install x11-utils
xwininfo
This can be very helpful if you need to konw how build the select window is and at what position the top left corner is currently at.
xwininfo_data=$(xwininfo)
$ declare -A xwin_data=(
["x"]="$(awk -F: '/Absolute upper-left X/{print $2}' <<<"${xwininfo_data}")"
["y"]="$(awk -F: '/Absolute upper-left Y/{print $2}' <<<"${xwininfo_data}")"
["w"]="$(awk -F: '/Width/{print $2}' <<<"${xwininfo_data}")"
["h"]="$(awk -F: '/Height/{print $2}' <<<"${xwininfo_data}")"
)
Now you have all the needed data in the xwin_data
dictionary.
To access it, just do something like this:
$ echo "${xwin_data["x"]}"
$ for f in x y w h ; do echo "$f is ${xwin_data["${f}"]}" ; done