tony / oxwm

updated man page, and added docs site to readme Browse files
tonybtw committed 2025-12-09 parent 1f89cc1 commit 14dbc9cb524d55046f7ced758dbc3ada7e3a759d
Showing 2 changed files with 273 additions and 39 deletions. UnifiedSplit
+2 −0 readme.org
@@ -36,6 +36,8 @@
36 * OXWM — DWM but Better (and oxidized) 36 * OXWM — DWM but Better (and oxidized)
37 A dynamic window manager written in Rust, inspired by dwm but designed to evolve beyond it. OXWM features a clean, functional Lua API for configuration with hot-reloading support, ditching the suckless philosophy of *"edit + recompile"*. Instead, we focus on lowering friction for users with sane defaults, LSP-powered autocomplete, and instant configuration changes without restarting your X session. 37 A dynamic window manager written in Rust, inspired by dwm but designed to evolve beyond it. OXWM features a clean, functional Lua API for configuration with hot-reloading support, ditching the suckless philosophy of *"edit + recompile"*. Instead, we focus on lowering friction for users with sane defaults, LSP-powered autocomplete, and instant configuration changes without restarting your X session.
38 38
39 +*Documentation:* [[https://ox-docs.vercel.app/][ox-docs.vercel.app]]
40 +
39 * Installation 41 * Installation
40 ** NixOS (with Flakes) 42 ** NixOS (with Flakes)
41 *** Adding OXWM to your flake inputs 43 *** Adding OXWM to your flake inputs
+271 −39 resources/oxwm.1
@@ -1,4 +1,4 @@
1 -.TH OXWM 1 "2025-10-30" "oxwm 0.4.0" "User Commands" 1 +.TH OXWM 1 "2025-12-08" "oxwm 0.8.0" "User Commands"
2 .SH NAME 2 .SH NAME
3 oxwm \- a dynamic tiling window manager for X11 written in Rust 3 oxwm \- a dynamic tiling window manager for X11 written in Rust
4 .SH SYNOPSIS 4 .SH SYNOPSIS
@@ -6,14 +6,14 @@ oxwm \- a dynamic tiling window manager for X11 written in Rust
6 [\fIOPTIONS\fR] 6 [\fIOPTIONS\fR]
7 .SH DESCRIPTION 7 .SH DESCRIPTION
8 .B oxwm 8 .B oxwm
9 -is a lightweight, dynamic tiling window manager for X11 inspired by dwm but ditching the suckless philosophy. Configuration is done via a runtime-loadable config file in RON format, allowing instant hot-reload without recompilation. 9 +is a lightweight, dynamic tiling window manager for X11 inspired by dwm but ditching the suckless philosophy. Configuration is done via a runtime-loadable Lua config file, allowing instant hot-reload without recompilation.
10 .PP 10 .PP
11 -Features include tag-based workspaces, configurable gaps, a modular status bar, keychord support, and persistent window state across restarts. 11 +Features include tag-based workspaces, multiple layouts (tiling, floating, monocle, grid, tabbed), configurable gaps, a modular status bar, keychord support, window rules, autostart commands, multi-monitor support, and persistent window state across restarts.
12 .SH OPTIONS 12 .SH OPTIONS
13 .TP 13 .TP
14 .B \-\-init 14 .B \-\-init
15 Create default config file at 15 Create default config file at
16 -.IR ~/.config/oxwm/config.ron 16 +.IR ~/.config/oxwm/config.lua
17 .TP 17 .TP
18 .B \-\-config \fIPATH\fR 18 .B \-\-config \fIPATH\fR
19 Use a custom config file at the specified path 19 Use a custom config file at the specified path
@@ -26,34 +26,40 @@ Print help message and exit
26 .SH CONFIGURATION 26 .SH CONFIGURATION
27 .B oxwm 27 .B oxwm
28 reads its configuration from 28 reads its configuration from
29 -.IR ~/.config/oxwm/config.ron . 29 +.IR ~/.config/oxwm/config.lua .
30 If no config exists on first launch, a default template will be created automatically. 30 If no config exists on first launch, a default template will be created automatically.
31 .PP 31 .PP
32 -The config file uses RON (Rusty Object Notation) format and supports: 32 +The config file uses Lua and provides a comprehensive API for customization:
33 .IP \(bu 2 33 .IP \(bu 2
34 Keybindings (including multi-key keychords) 34 Keybindings (including multi-key keychords)
35 .IP \(bu 2 35 .IP \(bu 2
36 -Colors and appearance 36 +Colors and appearance (borders, gaps)
37 .IP \(bu 2 37 .IP \(bu 2
38 -Status bar blocks (battery, RAM, datetime, shell commands) 38 +Status bar blocks (battery, RAM, datetime, shell commands, static text)
39 .IP \(bu 2 39 .IP \(bu 2
40 -Gaps and borders 40 +Window rules (per-application settings)
41 .IP \(bu 2 41 .IP \(bu 2
42 -Terminal and application settings 42 +Autostart commands
43 .IP \(bu 2 43 .IP \(bu 2
44 -Variable definitions with #DEFINE 44 +Layout symbols
45 +.IP \(bu 2
46 +Tag names (supports Unicode/Nerd Font icons)
45 .PP 47 .PP
46 After editing the config, reload with 48 After editing the config, reload with
47 .B Mod+Shift+R 49 .B Mod+Shift+R
48 -\(en no compilation required. 50 +\(en no compilation or X restart required.
51 +.PP
52 +LSP support is available via the
53 +.I ~/.config/oxwm/oxwm.lua
54 +type definitions file for autocomplete in editors.
49 .SH DEFAULT KEYBINDINGS 55 .SH DEFAULT KEYBINDINGS
50 The default modifier key is 56 The default modifier key is
51 .B Super 57 .B Super
52 -(Mod4). All bindings are customizable in config.ron. 58 +(Mod4). All bindings are customizable in config.lua.
53 .SS Window Management 59 .SS Window Management
54 .TP 60 .TP
55 .B Super+Return 61 .B Super+Return
56 -Spawn terminal (default: st) 62 +Spawn terminal (default: alacritty)
57 .TP 63 .TP
58 .B Super+Q 64 .B Super+Q
59 Kill focused window 65 Kill focused window
@@ -61,30 +67,40 @@ Kill focused window
61 .B Super+J, Super+K 67 .B Super+J, Super+K
62 Cycle focus down/up through windows 68 Cycle focus down/up through windows
63 .TP 69 .TP
70 +.B Super+Shift+J, Super+Shift+K
71 +Move window down/up in stack (swap position)
72 +.TP
64 .B Super+Shift+Space 73 .B Super+Shift+Space
65 Toggle floating mode for focused window 74 Toggle floating mode for focused window
66 .TP 75 .TP
67 .B Super+Shift+F 76 .B Super+Shift+F
68 Toggle fullscreen for focused window 77 Toggle fullscreen for focused window
69 -.TP
70 -.B Super+Control+H/J/K/L
71 -Move floating window left/down/up/right
72 -.TP
73 -.B Super+Shift+H/J/K/L
74 -Exchange focused window with neighbor in direction
75 .SS Layouts 78 .SS Layouts
76 .TP 79 .TP
77 .B Super+F 80 .B Super+F
78 -Switch to floating layout 81 +Switch to normie (floating) layout
79 .TP 82 .TP
80 .B Super+C 83 .B Super+C
81 Switch to tiling layout 84 Switch to tiling layout
82 .TP 85 .TP
86 +.B Super+N
87 +Cycle through available layouts
88 +.TP
83 .B Super+A 89 .B Super+A
84 Toggle gaps on/off 90 Toggle gaps on/off
91 +.SS Master Area (Tiling Layout)
85 .TP 92 .TP
86 -.B Alt+N 93 +.B Super+H
87 -Cycle through available layouts 94 +Decrease master area width
95 +.TP
96 +.B Super+L
97 +Increase master area width
98 +.TP
99 +.B Super+I
100 +Increment number of master windows
101 +.TP
102 +.B Super+P
103 +Decrement number of master windows
88 .SS Tags (Workspaces) 104 .SS Tags (Workspaces)
89 .TP 105 .TP
90 .B Super+1..9 106 .B Super+1..9
@@ -92,6 +108,12 @@ View tag 1-9
92 .TP 108 .TP
93 .B Super+Shift+1..9 109 .B Super+Shift+1..9
94 Move focused window to tag 1-9 110 Move focused window to tag 1-9
111 +.TP
112 +.B Super+Control+1..9
113 +Toggle multi-tag viewing (view multiple tags simultaneously)
114 +.TP
115 +.B Super+Control+Shift+1..9
116 +Toggle window on multiple tags (sticky window)
95 .SS Monitors 117 .SS Monitors
96 .TP 118 .TP
97 .B Super+Comma 119 .B Super+Comma
@@ -99,6 +121,12 @@ Focus previous monitor
99 .TP 121 .TP
100 .B Super+Period 122 .B Super+Period
101 Focus next monitor 123 Focus next monitor
124 +.TP
125 +.B Super+Shift+Comma
126 +Send window to previous monitor
127 +.TP
128 +.B Super+Shift+Period
129 +Send window to next monitor
102 .SS Launchers 130 .SS Launchers
103 .TP 131 .TP
104 .B Super+D 132 .B Super+D
@@ -113,39 +141,242 @@ Quit oxwm
113 .TP 141 .TP
114 .B Super+Shift+R 142 .B Super+Shift+R
115 Hot reload oxwm (reload config without restarting X) 143 Hot reload oxwm (reload config without restarting X)
116 -.SS Keychord Example
117 .TP 144 .TP
118 -.B Super+Space, T 145 +.B Super+Shift+/
119 -Spawn terminal (example keychord: two-key sequence) 146 +Show keybindings overlay
147 +.SH MOUSE BINDINGS
148 +.TP
149 +.B Super+Button1 (drag)
150 +Move window in floating mode
151 +.TP
152 +.B Super+Button3 (drag)
153 +Resize window in floating mode
120 .PP 154 .PP
121 -Press 155 +Clicking on a tag number in the status bar switches to that tag.
122 -.B Escape 156 +.SH LAYOUTS
123 -to cancel any in-progress keychord sequence. 157 +.B oxwm
158 +provides the following layouts:
159 +.TP
160 +.B Tiling
161 +Master/stack layout with adjustable master area size and number of master windows.
162 +.TP
163 +.B Normie
164 +Floating-by-default layout where windows can be freely positioned.
165 +.TP
166 +.B Monocle
167 +Fullscreen stacking layout showing one window at a time per tag.
168 +.TP
169 +.B Grid
170 +Equal-sized grid layout distributing windows evenly.
171 +.TP
172 +.B Tabbed
173 +Tabbed container layout with a tab bar for switching between windows.
124 .SH KEYCHORDS 174 .SH KEYCHORDS
125 .B oxwm 175 .B oxwm
126 -supports multi-key sequences called keychords. These allow binding complex commands to sequences like "Super+a then f". 176 +supports multi-key sequences called keychords. These allow binding commands to sequences like "Super+Space then T".
127 .PP 177 .PP
128 -Example keychord in config.ron: 178 +Example keychord in config.lua:
129 .PP 179 .PP
130 .EX 180 .EX
131 - (keys: [ 181 + oxwm.key.chord({
132 - (modifiers: [Mod4], key: A), 182 + { modifiers = { "Mod4" }, key = "space" },
133 - (modifiers: [], key: F), 183 + { modifiers = {}, key = "t" },
134 - ], action: ToggleFloating), 184 + }, oxwm.spawn_terminal)
135 .EE 185 .EE
136 .PP 186 .PP
137 -This binds "Super+a followed by f" to toggle floating mode. 187 +Press
188 +.B Escape
189 +to cancel any in-progress keychord sequence.
190 +.SH WINDOW RULES
191 +Window rules allow per-application settings based on window class, instance, or title:
192 +.PP
193 +.EX
194 + oxwm.rule.add({
195 + class = "Firefox",
196 + floating = false,
197 + tag = 2,
198 + })
199 +.EE
200 +.PP
201 +Rule properties:
202 +.IP \(bu 2
203 +.B class
204 +\- Match window class (substring)
205 +.IP \(bu 2
206 +.B instance
207 +\- Match window instance (substring)
208 +.IP \(bu 2
209 +.B title
210 +\- Match window title (substring)
211 +.IP \(bu 2
212 +.B floating
213 +\- Force floating mode (true/false)
214 +.IP \(bu 2
215 +.B tag
216 +\- Auto-assign to specific tag (1-9)
217 +.IP \(bu 2
218 +.B monitor
219 +\- Auto-assign to specific monitor
220 +.SH STATUS BAR
221 +The status bar displays tags, layout indicator, window title, and customizable blocks.
222 +.SS Block Types
223 +.TP
224 +.B DateTime
225 +Date/time with customizable format string
226 +.TP
227 +.B RAM
228 +RAM usage display (used/total)
229 +.TP
230 +.B Battery
231 +Battery status with charging/discharging/full states
232 +.TP
233 +.B Shell
234 +Execute shell command and display output
235 +.TP
236 +.B Static
237 +Static text display
238 +.SS Block Configuration
239 +Each block supports:
240 +.IP \(bu 2
241 +.B color
242 +\- Text color (hex: #RRGGBB or 0xRRGGBB)
243 +.IP \(bu 2
244 +.B underline
245 +\- Underline color
246 +.IP \(bu 2
247 +.B interval
248 +\- Update interval in seconds
249 +.SS Color Schemes
250 +Tag colors can be customized for three states:
251 +.IP \(bu 2
252 +.B Normal
253 +\- Unoccupied tags
254 +.IP \(bu 2
255 +.B Occupied
256 +\- Tags containing windows
257 +.IP \(bu 2
258 +.B Selected
259 +\- Currently viewed tag
260 +.SH LUA API
261 +The configuration uses the following Lua API modules:
262 +.SS Core Functions
263 +.TP
264 +.B oxwm.set_terminal(term)
265 +Set terminal emulator
266 +.TP
267 +.B oxwm.set_modkey(modkey)
268 +Set modifier key (Mod1-5, Shift, Control)
269 +.TP
270 +.B oxwm.set_tags(tags)
271 +Define workspace tag names
272 +.TP
273 +.B oxwm.autostart(cmd)
274 +Add autostart command
275 +.TP
276 +.B oxwm.spawn(cmd)
277 +Spawn command/program
278 +.TP
279 +.B oxwm.spawn_terminal()
280 +Spawn configured terminal
281 +.TP
282 +.B oxwm.quit()
283 +Quit window manager
284 +.TP
285 +.B oxwm.restart()
286 +Restart window manager
287 +.TP
288 +.B oxwm.show_keybinds()
289 +Show keybindings overlay
290 +.SS Key Bindings (oxwm.key)
291 +.TP
292 +.B oxwm.key.bind(modifiers, key, action)
293 +Single key binding
294 +.TP
295 +.B oxwm.key.chord(keyseq, action)
296 +Multi-key sequence binding
297 +.SS Border (oxwm.border)
298 +.TP
299 +.B oxwm.border.set_width(pixels)
300 +.TP
301 +.B oxwm.border.set_focused_color(color)
302 +.TP
303 +.B oxwm.border.set_unfocused_color(color)
304 +.SS Gaps (oxwm.gaps)
305 +.TP
306 +.B oxwm.gaps.set_enabled(bool)
307 +.TP
308 +.B oxwm.gaps.set_inner(h, v)
309 +.TP
310 +.B oxwm.gaps.set_outer(h, v)
311 +.TP
312 +.B oxwm.gaps.set_smart(bool)
313 +Enable smart gaps (no gaps with single window)
314 +.SS Client (oxwm.client)
315 +.TP
316 +.B oxwm.client.kill()
317 +.TP
318 +.B oxwm.client.toggle_fullscreen()
319 +.TP
320 +.B oxwm.client.toggle_floating()
321 +.TP
322 +.B oxwm.client.focus_stack(direction)
323 +.TP
324 +.B oxwm.client.move_stack(direction)
325 +.SS Layout (oxwm.layout)
326 +.TP
327 +.B oxwm.layout.set(name)
328 +Set specific layout ("tiling", "normie", "monocle", "grid", "tabbed")
329 +.TP
330 +.B oxwm.layout.cycle()
331 +.SS Tag (oxwm.tag)
332 +.TP
333 +.B oxwm.tag.view(index)
334 +.TP
335 +.B oxwm.tag.toggleview(index)
336 +.TP
337 +.B oxwm.tag.move_to(index)
338 +.TP
339 +.B oxwm.tag.toggletag(index)
340 +.SS Monitor (oxwm.monitor)
341 +.TP
342 +.B oxwm.monitor.focus(direction)
343 +Focus monitor (-1 prev, 1 next)
344 +.TP
345 +.B oxwm.monitor.tag(direction)
346 +Move window to monitor
347 +.SS Bar (oxwm.bar)
348 +.TP
349 +.B oxwm.bar.set_font(font)
350 +Set bar font (XFT format)
351 +.TP
352 +.B oxwm.bar.set_blocks(blocks)
353 +Set status bar blocks
354 +.TP
355 +.B oxwm.bar.set_scheme_normal(fg, bg, ul)
356 +.TP
357 +.B oxwm.bar.set_scheme_occupied(fg, bg, ul)
358 +.TP
359 +.B oxwm.bar.set_scheme_selected(fg, bg, ul)
138 .SH FILES 360 .SH FILES
139 .TP 361 .TP
140 -.I ~/.config/oxwm/config.ron 362 +.I ~/.config/oxwm/config.lua
141 Main configuration file 363 Main configuration file
142 .TP 364 .TP
365 +.I ~/.config/oxwm/oxwm.lua
366 +LSP type definitions for editor autocomplete
367 +.TP
143 .I /usr/share/xsessions/oxwm.desktop 368 .I /usr/share/xsessions/oxwm.desktop
144 X session desktop entry (if installed via package manager) 369 X session desktop entry (if installed via package manager)
145 .SH ENVIRONMENT 370 .SH ENVIRONMENT
146 .TP 371 .TP
147 .B DISPLAY 372 .B DISPLAY
148 X11 display to connect to (standard X11 variable) 373 X11 display to connect to (standard X11 variable)
374 +.TP
375 +.B XDG_CONFIG_HOME
376 +Custom config directory (default: ~/.config)
377 +.TP
378 +.B HOME
379 +Home directory for config location
149 .SH EXAMPLES 380 .SH EXAMPLES
150 .TP 381 .TP
151 Start oxwm normally: 382 Start oxwm normally:
@@ -160,7 +391,7 @@ Initialize config file:
160 .TP 391 .TP
161 Use custom config: 392 Use custom config:
162 .EX 393 .EX
163 - oxwm --config ~/my-oxwm-config.ron 394 + oxwm --config ~/my-oxwm-config.lua
164 .EE 395 .EE
165 .TP 396 .TP
166 Test in Xephyr (nested X server): 397 Test in Xephyr (nested X server):
@@ -184,7 +415,8 @@ Report bugs at: https://github.com/tonybanters/oxwm/issues
184 .BR X (7), 415 .BR X (7),
185 .BR dwm (1), 416 .BR dwm (1),
186 .BR dmenu (1), 417 .BR dmenu (1),
187 -.BR xrandr (1) 418 +.BR xrandr (1),
419 +.BR lua (1)
188 .SH AUTHORS 420 .SH AUTHORS
189 Written by Tony (tonybtw). 421 Written by Tony (tonybtw).
190 .PP 422 .PP