2zw - X11 Windowmanager
Files | Log | Commits | Refs | README
Size: 1820 bytes
2zw =============== 2zw is an extremely fast and lean dynamic window manager for X written in Zig. Features -------- - Small hackable Codebase (~1000 LOC) - Tiling in Master/Stack layout - No Workspaces, instead attach/detach Windows - No configuration file parsing, configured via source - Floating window management - Colored borders - Minimal approach to UI (no status bar) - Zero dependencies beyond X11 and Zig standard library Requirements ------------ In order to build 2zw you need: - Zig compiler (0.12.0 or newer) - Xlib header files - libX11-dev - libXrandr-dev Installation ------------ Edit build.zig to match your local setup (2zw is installed into the /usr/local namespace by default). Afterwards enter the following command to build and install 2zw: zig build install Running 2zw ----------- Add the following line to your .xinitrc to start 2zw using startx: exec 2zw In order to connect 2zw to a specific display, make sure that the DISPLAY environment variable is set correctly, e.g.: DISPLAY=foo.bar:1 exec 2zw Configuration ------------- All configuration is done directly in main.zig and rebuilding. The keybindings and configuration constants: FOCUS_BORDER_COLOR = 0xffd787; // Focused window border color NORMAL_BORDER_COLOR = 0x333333; // Normal window border color BORDER_WIDTH = 2; // Border width in pixels terminal = "st"; // Default terminal launcher = "dmenu_run"; // Default application launcher Keybindings (with MOD4/Super key): - MOD+q Kill focused window - MOD+a Attach window - MOD+d Detach window - MOD+, Focus previous window - MOD+. Focus next window - MOD+Return Launch terminal (default st) - MOD+p Launch application launcher (default dmenu) - MOD+s Launch slock