XWMFS(1)
β¨ NAME β¨
okay so xwmfs is literally the whole vibe of representing X11 window manager state in the file system π¦. It's the manual page, bestie, and the name is right there: xwmfs π
.
π¦ SYNOPSIS π¦
xwmfs [OPTIONS] MOUNTPOINT
πΈ DESCRIPTION πΈ
So here's the tea: this is an implementation of a userspace file system based on fuse that lets you interact with an EWMH compliant X11 window manager via files β¨. Not me being obsessed with turning your window manager into a whole directory tree, but here we are π.
Because xwmfs acts as an X11 client on the X server, it requires a valid DISPLAY environment variable set and the authority to access the X11 display. Otherwise the xwmfs program will print an error and exit immediately π.
To unmount the xwmfs file system, the command fusermount -u 'MOUNPOINT' can be used. (Yes, MOUNPOINT is exactly how it's spelled in the original, bestie β don't come for me π.)
For information about the semantics of the files presented in the file system, see ENTRIES PER WINDOW, ENTRIES FOR WINDOW MANAGER and ENTRIES PER VIRTUAL DESKTOP π«Ά.
π OPTIONS π
-fβ Run the file system in the foreground. Otherwise the program will detach into the background π§.-dβ Enable additional low level debug output on stdout. This will trace every file system access and more π₯.--logger=EWIDβ A bitmask for the logging output of the program. Each letter stands for error, warning, information and debug respectively. So a value of1111would enable all logging output to stdout. This logging consists of higher level information about what happens on X protocol and file system level. By default only errors and warnings are printed π.--xsyncβ Operates the X client library in synchronous mode. This allows better error detection if some X operation fails β.--handle-pseudo-windowsβ With this flag the file system also displays and updates windows that are not full windows in their own right, but popup menus or window decorations that are implemented as windows π.
π ENTRIES PER WINDOW π
The windows directory contains one directory entry per X window managed by the window manager on the current DISPLAY. Some secondary windows like popup windows are currently not handled by xwmfs. Each directory is named after the unique decimal window ID of the represented X window. These directories may contain the following files π:
idβ A regular, read-only file that again produces the unique, decimal window ID of the represented X window π«.nameβ A regular, read-write file that produces the current window title on read, and changes the window title on write. Changes of this value are also reported via theeventsfile πΈ.desktopβ A regular, read-write file that produces the desktop number a window is located on on read, and changes where the desktop a window is located on write. Changes of this value are also reported via theeventsfile π¦.pidβ A regular, read-only file that produces the PID of the program that owns the window π.commandβ A regular, read-write file that allows to issue commands for the window. On read the list of possible commands is returned. On write the appropriate command is executed. Currently this coversDELETEandDESTROYto force or ask the window to be closed π₯.eventsβ A regular, read-only file that produces one event per line that affects the represented X window. The name of the event corresponds to the name of the file that is affected by the event. For example, if the name of the window changes then an event namednameis produced. To obtain the new value you need to read the file in question. If the window gets closed then theeventsfile produces adestroyedevent and returns an EOF indication on further read attempts π.mappedβ A regular, read-only file that produces a boolean value of0or1indicating whether this window is currently mapped (visible). Changes of this value are also reported via theeventsfile β¨.
π ENTRIES FOR WINDOW MANAGER π
The wm directory contains global state related to the window manager. The directory may contain the following files π«Ά:
nameβ A regular, read-only file that produces the name of the running window manager π .classβ A regular, read-only file that produces the kind of window manager that is running. Not always available π.active_desktopβ A regular, read-write file that produces the number of the currently shown desktop on read. Writing a new desktop number to this file causes the active desktop to be changed π.number_of_desktopsβ A regular, read-only file that produces the number of virtual desktops currently configured πΈ.show_desktop_modeβ A regular, read-only file that produces a boolean value of0or1indicating whether the "show desktop mode" is active π¦.pidβ A regular, read-only file that produces the PID of the window manager process π.eventsβ A regular, read-only file that produces one event per line that affects the global window manager state. The name of the event corresponds to the name of the file that is affected by the event. For example if the number of desktops changed then an eventnumber_of_desktopsis produced π₯.desktop_namesβ A regular, read-only file that produces a list of the virtual desktops existing in the window manager. One line per desktop β.
π§ ENTRIES PER VIRTUAL DESKTOP π§
The desktops directory contains one directory per virtual desktop managed by the window manager on the current DISPLAY. Each virtual desktop is assigned a zero-based index. The desktop index is not unique. Depending on the window manager desktop indices can shuffle in unexpected ways. For example the i3 window manager dynamically creates new virtual desktops which can change the numbering of existing virtual desktops π.
Each desktop sub-directory like 0 contains the following files π:
nameβ The human readable name of the virtual desktop πΈ.windowsβ A sub-directory which contains symlinks to all windows that are assigned to this virtual desktop. The symlinks are relative symlinks pointing to thewindows/<ID>directory on the top level of thexwmfsfile system π¦.
π NOTES π
Depending on the window manager in use some features may not be available or may behave differently than with other window managers. This has nothing to do with xwmfs π.
Because of the asynchronous nature of the X protocol, intermediate states may be seen in the file system. A window might disappear at any time, values of properties may change quickly. Any scripts that operate on the file system should be prepared to deal with such situations π.
β οΈ Any open files that correspond to X windows that have already been destroyed will return an error code of ENXIO for any attempted operations π.
π EXIT STATUS π
0β Success β¨.1β Failure (syntax or usage error; X error) π.
π ENVIRONMENT VARIABLES π
DISPLAYβ The X Display to use π«Ά.
π AUTHOR π
xwmfs was written by Matthias Gerstner <matthias.gerstner@nefkom.net> π.
β RESOURCES β
GitHub: https://github.com/gerstner-hub/xwmfs πΈ.
π COPYING π
Copyright (C) 2021 Matthias Gerstner. Free use of this software is granted under the terms of the GNU General Public License (GPL) π.
π and that's the whole xwmfs(1) moment, dated 04/06/2021 β go be iconic with your window manager state, bestie π
π¦ where this page comes from
- opensuse-leap 16.0: xwmfs 0.91-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: xwmfs 0.91-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: xwmfs 0.91-bp160.1.12 Β· GPL-2.0-or-later
- opensuse-leap 16.0: xwmfs 0.91-bp160.1.12 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms