Both CLX and stumpwm have documentation in the info format. Brief descriptions of some of their variables, structures, and functions are from those documents, as well as further details derived from their lisp sources. Search for the following titles to find their sections further below: * Variables and classes * Functions for querying * Functions for customizing * Numeric pad layout for Apple model no. A1243 Variables and classes. Xserver hierarchy: an X display > screen(s) > root window > window hierarchy Access from xlib package: an xlib display > xlib screen(s) > an xlib window > ... Access from stumpwm package: *display*, *screen-list* > a stumpwm screen > xlib screen The variable stumpwm:*display* is an xlib display. a stumpwm window (class) > window-xwin > an xlib window The function stumpwm:window-xwin is a class accessor. Typically only one display for stumpwm, and one screen. [The first display and first screen is written as either :0.0 or :0 when used with command line (CLI) programs.] The CLX xlib package uses `xlib:def-clx-class', making use of 'defstruct', for some of its own classes, f.e. display, screen, window, pixmap, etc. See the source 'clx.lisp'. The stumpwm tile-view manager has similarly named classes, but different structures for different purposes. There are stumpwm functions providing the xlib instances from the stumpwm instances for use with the xlib functions. The xlib instances and functions are more direct, but the stumpwm functions (for stumpwm instances) might be more convenient. An xlib window is also a type of "drawable" class, therefore it has width, height, and other attributes. A stumpwm window belongs to only one stumpwm group of windows. A group has frames for revealing any of the windows of the group. stumpwm:*display* an xlib display connected from stumpwm stumpwm:*screen-list* list of stumpwm screens stumpwm screen class primitives.lisp:562-609 screen-number provides the xlib screen stumpwm window class window.lisp:52-74 window-xwin provides the xlib window window-group provides the stumpwm group Functions for querying. xlib:global-pointer-position requests.lisp:664-672 Provides coordinates of pointer and its root window (xlib window). Needs: an xlib display Returns multiple values (3): x, y, root window (xlib window) for pointer xlib:pointer-position requests.lisp:653-662 Provides coordinates of pointer and whether pointer is on the same screen as xlib window. Needs: an xlib window Returns multiple values (3): x, y, boolean (pointer on same screen as window) xlib:screen-root Provides root window (xlib window) of an xlib screen. Needs: an xlib screen xlib:screen-width xlib:screen-height Provides width or height of screen. Needs: an xlib screen xlib:drawable-root attributes.lisp:558-562 Provides the root xlib window of a window or pixmap. Needs: a drawable (t.i. an xlib window or a pixmap) Does: (with-geometry (drawable :sizes 32) (window-get 8 (drawable-display drawable))) Discrepancy: The xlib window seems like a copy of sorts. For example, its plist seems unmodifiable. Consider "xlib:screen-root". xlib:drawable-width xlib:drawable-height Provides width or height of the drawable, f.e. a window. Also settable with `setf', which then resizes the drawable. Needs: an xlib window or pixmap xlib:window-equal Returns T when both xlib windows are (mostly) the same. Needs: an xlib window, an xlib window xlib:drawable-plist xlib:window-plist Returns the plist (a class attribute) for an xlib window or pixmap, or specifically for an xlib window. Needs: a drawable (an xlib window or a pixmap) or specifically an xlib window Discrepancy: The plist of the xlib window from "xlib:drawable-root" seems unmodifiable. The window is likely a copy of sorts. The plist of the xlib window from "xlib:screen-root" seems fine. It is from an instance of the CLX custom class "screen", which uses the Common Lisp "defstruct". xlib:query-tree requests.lisp:181-198 Provides list of subwindows for an xlib window, its parent, and its root window. Needs: an xlib window Optional key: :result-type For type of sequence. Default 'list. Returns multiple values (3): sequence of subwindows with least prioritized as first parent xlib window (or NIL when root window) root xlib window Discrepancy: The root xlib window seems like a copy of sorts. For example, its plist seems unmodifiable. stumpwm:current-screen screen.lisp:130-132 Provides the current stumpwm screen. Does: (car stumpwm:*screen-list*) stumpwm:window-screen window.lisp:259-260 Provides the stumpwm screen that has the stumpwm window. Needs: a stumpwm window Does: (stumpwm:group-screen(stumpwm:window-group window)) stumpwm:screen-width stumpwm:screen-height Provides width (or height) of the root window of a screen. Needs: a stumpwm screen Does: (xlib:drawable-width(stumpwm:screen-root screen)) stumpwm:screen-root screen.lisp:198-199 Provides the root window (xlib window) of the xlib screen from a stumpwm screen. Needs: a stumpwm screen Does: (xlib:screen-root(stumpwm:screen-number screen)) stumpwm:current-window screen.lisp:178-180 Provides the current stumpwm window. Does: (stumpwm:screen-current-window(stumpwm:current-screen)) Functions for customizing. xlib:warp-pointer requests.lisp:703-711 Place pointer at (x, y) coordinates within xlib window. Needs: an xlib window x as an integer y as an integer xlib/xtest:fake-button-event extensions/xtest.lisp:117-128 Send event for a pointer button (1-5) to a display. Uses: xlib:with-buffer-request Needs: an xlib display button number t for button-press, or nil for button-release Keywords: :delay is milliseconds xlib:with-buffer-request macros.lisp:696-717 No documentation. stumpwm:send-fake-click core.lisp:74-82 Send event for a pointer button to a window, either by means of XTEST, or xlib:send-event (via stumpwm:xlib-fake-click). Needs: a stumpwm window button number Uses: (stumpwm:xlib-fake-click (screen-root(window-screen window)) (window-xwin window) button-number) Fails: Button presses seem to work only when done twice, rather than when done only once. Releases seem to always fail. Code tests for the "clx-ext-test" feature, but the XTEST extension is undetectable in that manner for this CLX package (0.7.5, 2018-02-04). Additionally, this CLX package has XTEST named with "xlib/xtest" rather than "xtest". Replace with: xlib/xtest:fake-button-event stumpwm:xlib-fake-click core.lisp:60-72 Send event for a pointer button. An alternative for when XTEST is unavailable as a feature. Uses: xlib:send-event Needs: root window (xlib window) an xlib window button number Fails: Button releases seem to fail when used by stumpwm:send-fake-click. Manual for stumpwm recommends XTEST feature of the Xserver, typically available from a CLX package. Replace with: xlib/xtest:fake-button-event stumpwm:define-key Bind a button to a command within a keymap. *top-map* has the prefix key *root-map* requires prefix key is used with binding Needs: keymap text description of button (see stumpwm:kbd) command stumpwm:kbd Converts text into the proper name for a button. Needs: Text with button description, f.e. "C-M-H-S-s-z" for the Control-Meta-Hyper-Shift-super modifiers and z button. stumpwm:define-interactive-keymap Specify a set of button bindings, and without need of the prefix binding (t.i. the default C-t).