最小、灵活且用户友好的 X 格式窗口管理器
Ragnar is a feature-rich, straight-to-the-point dynamic window manager for X11.
Ragnar is designed to work as both a foundation for full desktop environments and as a minimal daily-driver window manager. The project stays compact at roughly 5,000 lines of code while still providing core window manager features such as:
Since version 2.0, Ragnar uses the XCB API to communicate with the X server. XCB provides a lower-level alternative to Xlib and gives Ragnar more direct control over X11 interactions.
Installing Ragnar involves two steps.
Install the following dependencies:
libxcb \
libx11 \
xcb-util-keysyms \
xcb-util-cursor \
xcb-util-wm \
xorg-server \
xorg-xinit \
libconfig
Run the installation script from the project root:
./install.sh
Ragnar uses reparenting to manage client windows. This allows the window manager to create and control decorations around client windows.
Client windows are stored in a doubly linked list. For tiling, Ragnar does not use a tree-based layout system. Instead, it provides preset layouts with predictable structure. This keeps window placement simple and avoids requiring the user to manually decide where each new window should appear.
Layouts can still be adjusted at runtime by changing the size of master and slave areas through keybindings.
Ragnar includes an abstracted IPC API for plugin development and external control.
The IPC system communicates through a socket using binary data. This allows external programs to interact with the window manager in a structured way.
Ragnar uses libconfig to load an external configuration file:
# by default, system-wide:
/etc/ragnarwm/ragnar.cfg
# or mkdir -p and cp the default per user.
~/.config/ragnarwm/ragnar.cfg
The configuration is loaded on startup and can be reloaded while the window manager is running, typically through a keybinding (Super+C).
Example contents of .xinitrc:
feh --bg-fill ~/Downloads/nerd.jpg;
xset s off -dpms;
picom -b; polybar &
exec ragnar
Then simply; startx (and pkill xinit to stop it.)
By default it uses
alacritty(Super+Return) anddmenu(Super+S), if you haven't edited these yet. Both of these need fonts file; for instancettf-dejavu
Other optional deps can be seen in: PKGBUILD, might differ per distro/configuration.
funcs.hContains documented function declarations used throughout the window manager.
This file does not contain callback functions triggered by keybindings.
keycallbacks.hContains documented definitions of callback functions that can be assigned to keybindings in the configuration file.
ragnar.cThe main translation unit of the window manager.
It contains the core implementation, including:
structs.hContains shared structures and function declarations used across the codebase.
config.h / config.cHandles loading and parsing the Ragnar configuration file through libconfig.
ipc/socket.h / ipc/socket.cImplements socket handling for IPC clients.
realtime.cInfrastructure for faster response time of keybinds.
暂无开放 Issues,或尚未同步最近议题。