plwm is an X11 dynamic tiling window manager written in Prolog. It features a modular architecture with separate Prolog modules for window management logic, layouts, menus, settings, and utilities, combined with C bindings to X11 libraries via SWI-Prolog's FFI. The system processes X11 events in a main event loop, manages window state through dynamic predicates, and provides multiple interaction methods including keyboard shortcuts, dmenu/rofi menus, and a scriptable command FIFO. Key entry points include the main Prolog file (src/plwm.pl), build system (Makefile), and installation script (tools/install.sh). External dependencies include X11 libraries (libX11, libXft, libXrandr) and SWI-Prolog.
This repository is a personal knowledge base and learning collection focused on SWI-Prolog and logic programming. It contains extensive notes, tutorials, code snippets, and reusable utility modules covering a wide range of Prolog topics: language internals (data types, operators, dicts, exceptions), programming patterns (DCGs, difference lists, delimited continuations, foldl/r), puzzles, exercises, and integration with Java via JPL. The code is well-documented and includes unit tests (plunit) for many components. While not a cohesive application, the repository offers several self-contained, reusable Prolog predicates and patterns that demonstrate good Prolog craftsmanship. The primary value is as a reference and source of reusable utility code for SWI-Prolog developers.