$ show raboof/notion
Notion is an X11 window manager with tiling, tabbing, and floating layout capabilities. It features a modular architecture where core functionality resides in ioncore/ and extends via loadable modules (mod_tiling, mod_menu, mod_statusbar, etc.). Configuration and extensibility are driven by Lua scripts, allowing deep customization of key bindings, layouts, and status bar elements. The system handles X11 events, manages window geometry and focus, and provides session saving/restoring. Key components include a reference-counted object system (libtu/obj), Lua-C binding layer (libextl), hook system (libmainloop/hooks), and binding maps for contextual input handling. Despite its age, the codebase shows recent activity and maintains compatibility with modern X11 environments.
The LLM identified 5 files worth highlighting for reuse:
Implements a reference-counted object system in C with dynamic function tables for polymorphism. Used throughout the codebase for regions, windows, and drawing engines. Self-contained with minimal dependencies (libtu/util, libtu/errorlog). Demonstrates clean OOP patterns in C suitable for extraction.
Provides a generalized callback mechanism for extensible event handling. Used for layout setup, focus changes, and module initialization. Depends only on libtu/list and libtu/util. Represents a reusable observer pattern implementation in C.
Facilitates Lua-C integration for exchanging tables, strings, numbers, and function calls. Enables configuration via Lua scripts and module extensibility. Self-contained with libtu and Lua dependencies. Shows skill in safely bridging language boundaries with proper reference counting.
Manages contextual key and mouse bindings with submap support for mode-specific shortcuts. Used in ioncore for processing X events. Depends on libtu/rb (red-black tree) and ioncore/types. Demonstrates a non-trivial binding system with hierarchical context management.
Self-balancing binary search tree implementation with insert, delete, and search operations. Used in bindmaps and elsewhere for efficient key-value storage. Minimal dependencies (libtu/util). Represents a well-crafted, reusable data structure suitable for extraction.