archived: not maintained
- C 98.2%
- Makefile 1.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- Rewrote horizon-wm.c: 2004 lines of C, zero compile errors - Full tag system (9 virtual desktops, DWM-style) - Master/stack, monocle, and floating layouts - Bar with tags, layout symbol, window title, status text (root WM_NAME) - Gaps between windows (configurable) - EWMH compliant (_NET_ACTIVE_WINDOW, _NET_WM_STATE, _NET_CLIENT_LIST, etc.) - ICCCM: WM_DELETE_WINDOW, WM_STATE, transient window support - Mouse: left-click raise, middle-click float, right-click resize, edge snap - Multi-monitor support with Xinerama-style detection - Dual config system: config.h (compile-time DWM-style) + config.ini (runtime INI) - INI parser: ini.c/ini.h, ~120 lines, no deps - Keybindings: 30+ keybinds (spawn, focus, kill, tags, layouts, monitors, float) - Floating window drag with snap-to-edge - Client message handler (_NET_WM_STATE, _NET_ACTIVE_WINDOW) - configurenotify: screen resize detection - focusin: prevents focus stealing - Error dummy handler for xcb - .gitignore for binaries and build artifacts - Updated Makefile: USE_INI=1 flag for INI config build - Updated README.md: full keybinding table, feature list, config docs |
||
| config.h | ||
| config.ini | ||
| config.mk | ||
| horizon-wm | ||
| horizon-wm.c | ||
| horizon-wm.o | ||
| ini.c | ||
| ini.h | ||
| Makefile | ||
| README.md | ||
horizon-wm
A minimal tiling window manager for Horizon Linux, written in C using XCB.
~2000 lines of C. musl + LLVM compatible. Inspired by DWM.
Features
- Master/stack tiling layout with configurable split ratio
- Monocle (maximized) and floating layouts
- Tag system (9 virtual desktops, DWM-style)
- Bar with tags, layout symbol, window title, and status text
- Gaps between windows (configurable)
- EWMH compliant — works with panels, docks, taskbars
- ICCCM — WM_DELETE_WINDOW, WM_STATE, transient windows
- Mouse support — left click raise, middle click float, right click resize
- Floating window drag with edge snapping
- Multi-monitor support
- Dual config system — compile-time
config.h(DWM-style) or runtimeconfig.ini(INI parser, no recompile)
Build
make # compile-time config (edit config.h)
make USE_INI=1 # runtime config (edit ~/.config/horizon-wm/config.ini)
sudo make install
Dependencies
- clang (LLVM)
- pkg-config
- libxcb
- xcb-util
- xcb-util-keysyms
- xcb-util-wm (xcb-icccm)
- xcb-util-cursor
- libx11 (for keysym headers)
Keybindings
All keybindings use Super (Mod4) as the modifier.
Window management
| Key | Action |
|---|---|
| Super+Return | Launch terminal |
| Super+Alt+Return | Launch terminal (alternate) |
| Super+Shift+C | Kill focused window |
| Super+Shift+Q | Quit |
| Super+F | Toggle floating |
| Super+M | Swap with master |
| Super+Space | Toggle floating (shift) |
Focus
| Key | Action |
|---|---|
| Super+J | Focus next window |
| Super+K | Focus previous window |
| Super+Tab | Focus next window |
| Super+Ctrl+J | Focus stack next |
| Super+Ctrl+K | Focus stack prev |
| Super+I | Focus stack next |
| Super+U | Focus urgent window |
Tags / Workspaces
| Key | Action |
|---|---|
| Super+1-5 | View tag 1-5 |
| Super+0 | View all tags |
| Super+P | View all tags |
| Super+O | View all tags |
Layout
| Key | Action |
|---|---|
| Super+Grave | Cycle layout (tile/monocle/float) |
| Super+N | Increase master count |
| Super+Backspace | Decrease master count |
| Super+B | Toggle bar |
Monitor
| Key | Action |
|---|---|
| Super+H | Focus monitor left |
| Super+L | Focus monitor right |
| Super+Shift+H | Focus monitor left (alt) |
| Super+Shift+L | Focus monitor right (alt) |
| Super+, | Send to monitor left |
| Super+. | Send to monitor right |
| Super+J (shift) | Send to monitor left |
| Super+K (shift) | Send to monitor right |
Mouse
| Action | Effect |
|---|---|
| Left click bar tag | Switch to tag |
| Left click window | Raise / focus |
| Middle click window | Toggle floating |
| Right click window | Resize |
| Super+drag window | Move floating window |
Configuration
Compile-time (config.h)
Edit config.h and recompile. This is the DWM-style approach.
Key options:
TERMINAL— default terminal commandBARHEIGHT— bar height in pixelsBORDERPX— window border widthGAPSPX— gap size between windowsSNAP— edge snap distance for floating windowsNUMTAGS— number of tags (default 5)rules[]— window rules (class → tag, floating)colornames[]— color schememondefaults— per-monitor defaults (mfact, nmaster, layout, showbar, topbar)
Runtime (config.ini)
Build with make USE_INI=1, then edit ~/.config/horizon-wm/config.ini or /etc/horizon-wm/config.ini.
[general]
terminal = alacritty
bar_height = 24
border_width = 1
gaps = 6
snap = 32
[colors]
focused = #ffffff
unfocused = #444444
bar_bg = #1a1a2e
bar_text = #e0e0e0
[rules]
firefox = 2
mpv = 4:float
License
BSD-3-Clause