archived: not maintained
This repository has been archived on 2026-11-08. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • C 98.2%
  • Makefile 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michał aaab40bdda
horizon-wm v0.2.0: full 2K-line WM with dual config, bar, tags, EWMH, mouse
- 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
2026-09-05 22:20:45 +02:00
config.h horizon-wm v0.2.0: full 2K-line WM with dual config, bar, tags, EWMH, mouse 2026-09-05 22:20:45 +02:00
config.ini horizon-wm v0.2.0: full 2K-line WM with dual config, bar, tags, EWMH, mouse 2026-09-05 22:20:45 +02:00
config.mk horizon-wm v0.2.0: full 2K-line WM with dual config, bar, tags, EWMH, mouse 2026-09-05 22:20:45 +02:00
horizon-wm Initial commit: minimal XCB tiling WM 2026-09-05 21:51:56 +02:00
horizon-wm.c horizon-wm v0.2.0: full 2K-line WM with dual config, bar, tags, EWMH, mouse 2026-09-05 22:20:45 +02:00
horizon-wm.o Initial commit: minimal XCB tiling WM 2026-09-05 21:51:56 +02:00
ini.c horizon-wm v0.2.0: full 2K-line WM with dual config, bar, tags, EWMH, mouse 2026-09-05 22:20:45 +02:00
ini.h horizon-wm v0.2.0: full 2K-line WM with dual config, bar, tags, EWMH, mouse 2026-09-05 22:20:45 +02:00
Makefile horizon-wm v0.2.0: full 2K-line WM with dual config, bar, tags, EWMH, mouse 2026-09-05 22:20:45 +02:00
README.md horizon-wm v0.2.0: full 2K-line WM with dual config, bar, tags, EWMH, mouse 2026-09-05 22:20:45 +02:00

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 runtime config.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 command
  • BARHEIGHT — bar height in pixels
  • BORDERPX — window border width
  • GAPSPX — gap size between windows
  • SNAP — edge snap distance for floating windows
  • NUMTAGS — number of tags (default 5)
  • rules[] — window rules (class → tag, floating)
  • colornames[] — color scheme
  • mondefaults — 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