oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git
9,050 bytes raw
1
.TH OXWM 1 "2025-12-08" "oxwm 0.8.0" "User Commands"
2
.SH NAME
3
oxwm \- a dynamic tiling window manager for X11 written in Zig
4
.SH SYNOPSIS
5
.B oxwm
6
[\fIOPTIONS\fR]
7
.SH DESCRIPTION
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 Lua config file, allowing instant hot-reload without recompilation.
10
.PP
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
13
.TP
14
.B \-\-init
15
Create default config file at
16
.IR ~/.config/oxwm/config.lua
17
.TP
18
.B \-\-config \fIPATH\fR
19
Use a custom config file at the specified path
20
.TP
21
.B \-\-version
22
Print version information and exit
23
.TP
24
.B \-\-help
25
Print help message and exit
26
.SH CONFIGURATION
27
.B oxwm
28
reads its configuration from
29
.IR ~/.config/oxwm/config.lua .
30
If no config exists on first launch, a default template will be created automatically.
31
.PP
32
The config file uses Lua and provides a comprehensive API for customization:
33
.IP \(bu 2
34
Keybindings (including multi-key keychords)
35
.IP \(bu 2
36
Colors and appearance (borders, gaps)
37
.IP \(bu 2
38
Status bar blocks (battery, RAM, datetime, shell commands, static text)
39
.IP \(bu 2
40
Window rules (per-application settings)
41
.IP \(bu 2
42
Autostart commands
43
.IP \(bu 2
44
Layout symbols
45
.IP \(bu 2
46
Tag names (supports Unicode/Nerd Font icons)
47
.PP
48
After editing the config, reload with
49
.B Mod+Shift+R
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.
55
.SH DEFAULT KEYBINDINGS
56
The default modifier key is
57
.B Super
58
(Mod4). All bindings are customizable in config.lua.
59
.SS Window Management
60
.TP
61
.B Super+Return
62
Spawn terminal (default: alacritty)
63
.TP
64
.B Super+Q
65
Kill focused window
66
.TP
67
.B Super+J, Super+K
68
Cycle focus down/up through windows
69
.TP
70
.B Super+Shift+J, Super+Shift+K
71
Move window down/up in stack (swap position)
72
.TP
73
.B Super+Shift+Space
74
Toggle floating mode for focused window
75
.TP
76
.B Super+Shift+F
77
Toggle fullscreen for focused window
78
.SS Layouts
79
.TP
80
.B Super+F
81
Switch to normie (floating) layout
82
.TP
83
.B Super+C
84
Switch to tiling layout
85
.TP
86
.B Super+N
87
Cycle through available layouts
88
.TP
89
.B Super+A
90
Toggle gaps on/off
91
.SS Master Area (Tiling Layout)
92
.TP
93
.B Super+H
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
104
.SS Tags (Workspaces)
105
.TP
106
.B Super+1..9
107
View tag 1-9
108
.TP
109
.B Super+Shift+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)
117
.SS Monitors
118
.TP
119
.B Super+Comma
120
Focus previous monitor
121
.TP
122
.B Super+Period
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
130
.SS Launchers
131
.TP
132
.B Super+D
133
Launch dmenu
134
.TP
135
.B Super+S
136
Take screenshot with maim (selection to clipboard)
137
.SS Window Manager
138
.TP
139
.B Super+Shift+Q
140
Quit oxwm
141
.TP
142
.B Super+Shift+R
143
Hot reload oxwm (reload config without restarting X)
144
.TP
145
.B Super+Shift+/
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
154
.PP
155
Clicking on a tag number in the status bar switches to that tag.
156
.SH LAYOUTS
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.
174
.SH KEYCHORDS
175
.B oxwm
176
supports multi-key sequences called keychords. These allow binding commands to sequences like "Super+Space then T".
177
.PP
178
Example keychord in config.lua:
179
.PP
180
.EX
181
    oxwm.key.chord({
182
        { modifiers = { "Mod4" }, key = "space" },
183
        { modifiers = {}, key = "t" },
184
    }, oxwm.spawn_terminal)
185
.EE
186
.PP
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)
360
.SH FILES
361
.TP
362
.I ~/.config/oxwm/config.lua
363
Main configuration file
364
.TP
365
.I ~/.config/oxwm/oxwm.lua
366
LSP type definitions for editor autocomplete
367
.TP
368
.I /usr/share/xsessions/oxwm.desktop
369
X session desktop entry (if installed via package manager)
370
.SH ENVIRONMENT
371
.TP
372
.B DISPLAY
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
380
.SH EXAMPLES
381
.TP
382
Start oxwm normally:
383
.EX
384
    oxwm
385
.EE
386
.TP
387
Initialize config file:
388
.EX
389
    oxwm --init
390
.EE
391
.TP
392
Use custom config:
393
.EX
394
    oxwm --config ~/my-oxwm-config.lua
395
.EE
396
.TP
397
Test in Xephyr (nested X server):
398
.EX
399
    Xephyr -screen 1280x800 :1 &
400
    DISPLAY=:1 oxwm
401
.EE
402
.SH TESTING
403
Test oxwm without affecting your current session using Xephyr:
404
.PP
405
.EX
406
    # Start nested X server
407
    Xephyr -screen 1280x800 :1 &
408
409
    # Run oxwm in it
410
    DISPLAY=:1 oxwm
411
.EE
412
.SH BUGS
413
Report bugs at: https://github.com/tonybanters/oxwm/issues
414
.SH SEE ALSO
415
.BR X (7),
416
.BR dwm (1),
417
.BR dmenu (1),
418
.BR xrandr (1),
419
.BR lua (1)
420
.SH AUTHORS
421
Written by Tony (tonybtw).
422
.PP
423
Inspired by dwm but designed to be user-friendly and eliminate arbitrary elitism.
424
.SH LICENSE
425
GPL v3 - see https://www.gnu.org/licenses/gpl-3.0.en.html