tony / oxwm

Branch: f7f0420
Switch branches/tags
master
tonybanters Added feature for beamy to use oxwm. f72f06d 2026-03-23
336 lines · 11.8 KB Raw Blame History
1 ---@meta
2
3 ---OXWM Configuration API Type Definitions
4 ---
5 ---DO NOT EDIT THIS FILE
6 ---This file is automatically generated and managed by OXWM.
7 ---It will be overwritten on every OXWM update to match the running version.
8 ---
9 ---Location: ~/.config/oxwm/lib/oxwm.lua
10 ---Configured via: ~/.config/oxwm/.luarc.json
11 ---
12 ---This file provides LSP autocomplete and type checking for your config.lua.
13 ---To use it, add this to the top of your config.lua:
14 --- ---@module 'oxwm'
15 ---
16 ---@class oxwm
17 oxwm = {}
18
19 ---Spawn a command
20 ---@param cmd string|string[] Command to spawn (string or array of strings)
21 ---@return table Action table for keybinding
22 function oxwm.spawn(cmd) end
23
24 ---Spawn the configured terminal emulator
25 ---@return table Action table for keybinding
26 function oxwm.spawn_terminal() end
27
28 ---Set the terminal emulator
29 ---@param terminal string Terminal command (e.g., "st", "alacritty")
30 function oxwm.set_terminal(terminal) end
31
32 ---Set the modifier key
33 ---@param modkey string Modifier key ("Mod1", "Mod4", "Shift", "Control")
34 function oxwm.set_modkey(modkey) end
35
36 ---Set workspace tags
37 ---@param tags string[] Array of tag names
38 function oxwm.set_tags(tags) end
39
40 ---Enable or disable automatic tiling of new windows
41 ---@param enabled boolean Enable or disable auto-tiling
42 function oxwm.auto_tile(enabled) end
43
44 ---Enable or disable tiled resize mode (Mod+RMB adjusts mfact instead of floating)
45 ---@param enabled boolean Enable or disable tiled resize mode
46 function oxwm.tiled_resize_mode(enabled) end
47
48 ---Set layout symbol override
49 ---@param name string Layout name (e.g., "tiling", "normie", "tabbed", "grid", "monocle")
50 ---@param symbol string Symbol to display (e.g., "[T]", "[F]", "[=]")
51 function oxwm.set_layout_symbol(name, symbol) end
52
53 ---Window rule module
54 ---@class oxwm.rule
55 oxwm.rule = {}
56
57 ---Add a window rule
58 ---@param rule {class: string?, instance: string?, title: string?, role: string?, floating: boolean?, tag: integer?, fullscreen: boolean?, focus: boolean?} Rule configuration
59 function oxwm.rule.add(rule) end
60
61 ---Quit the window manager
62 ---@return table Action table for keybinding
63 function oxwm.quit() end
64
65 ---Restart the window manager
66 ---@return table Action table for keybinding
67 function oxwm.restart() end
68
69 ---Recompile the window manager
70 ---@return table Action table for keybinding
71 function oxwm.recompile() end
72
73 ---Toggle gaps on/off
74 ---@return table Action table for keybinding
75 function oxwm.toggle_gaps() end
76
77 ---Show keybind overlay
78 ---@return table Action table for keybinding
79 function oxwm.show_keybinds() end
80
81 ---Set master area factor (adjust master window width in tiling layout)
82 ---@param delta integer Delta to adjust by (negative to decrease, positive to increase)
83 ---@return table Action table for keybinding
84 function oxwm.set_master_factor(delta) end
85
86 ---Increment/decrement number of master windows
87 ---@param delta integer Delta to adjust by (negative to decrease, positive to increase)
88 ---@return table Action table for keybinding
89 function oxwm.inc_num_master(delta) end
90
91 ---Keybinding module
92 ---@class oxwm.key
93 oxwm.key = {}
94
95 ---Bind a key combination to an action
96 ---@param modifiers string|string[] Modifier keys (e.g., {"Mod4"}, {"Mod4", "Shift"})
97 ---@param key string Key name (e.g., "Return", "Q", "1")
98 ---@param action table Action returned by oxwm functions
99 function oxwm.key.bind(modifiers, key, action) end
100
101 ---Bind a keychord (multi-key sequence) to an action
102 ---@param keys table[] Array of key presses, each: {{modifiers}, key}
103 ---@param action table Action returned by oxwm functions
104 function oxwm.key.chord(keys, action) end
105
106 ---Gap configuration module
107 ---@class oxwm.gaps
108 oxwm.gaps = {}
109
110 ---Set gaps enabled/disabled
111 ---@param enabled boolean Enable or disable gaps
112 function oxwm.gaps.set_enabled(enabled) end
113
114 ---Enable gaps
115 function oxwm.gaps.enable() end
116
117 ---Disable gaps
118 function oxwm.gaps.disable() end
119
120 ---Set inner gaps
121 ---@param horizontal integer Horizontal inner gap in pixels
122 ---@param vertical integer Vertical inner gap in pixels
123 function oxwm.gaps.set_inner(horizontal, vertical) end
124
125 ---Set outer gaps
126 ---@param horizontal integer Horizontal outer gap in pixels
127 ---@param vertical integer Vertical outer gap in pixels
128 function oxwm.gaps.set_outer(horizontal, vertical) end
129
130 ---Set smart gaps (disable outer gaps when only one window visible)
131 ---@param enabled boolean Enable or disable smart gaps
132 function oxwm.gaps.set_smart(enabled) end
133
134 ---Border configuration module
135 ---@class oxwm.border
136 oxwm.border = {}
137
138 ---Set border width
139 ---@param width integer Border width in pixels
140 function oxwm.border.set_width(width) end
141
142 ---Set focused window border color
143 ---@param color string|integer Color as hex string ("#ff0000", "0xff0000") or integer
144 function oxwm.border.set_focused_color(color) end
145
146 ---Set unfocused window border color
147 ---@param color string|integer Color as hex string ("#666666", "0x666666") or integer
148 function oxwm.border.set_unfocused_color(color) end
149
150 ---Client/window management module
151 ---@class oxwm.client
152 oxwm.client = {}
153
154 ---Kill the focused window
155 ---@return table Action table for keybinding
156 function oxwm.client.kill() end
157
158 ---Toggle fullscreen mode
159 ---@return table Action table for keybinding
160 function oxwm.client.toggle_fullscreen() end
161
162 ---Toggle floating mode
163 ---@return table Action table for keybinding
164 function oxwm.client.toggle_floating() end
165
166 ---Focus stack (next/previous window)
167 ---@param dir integer Direction (1 for next, -1 for previous)
168 ---@return table Action table for keybinding
169 function oxwm.client.focus_stack(dir) end
170
171 ---Move stack (next/previous window)
172 ---@param dir integer Direction (1 for next, -1 for previous)
173 ---@return table Action table for keybinding
174 function oxwm.client.move_stack(dir) end
175
176 ---Monitor management module
177 ---@class oxwm.monitor
178 oxwm.monitor = {}
179
180 ---Focus monitor
181 ---@param dir integer Direction (-1 for previous, 1 for next)
182 ---@return table Action table for keybinding
183 function oxwm.monitor.focus(dir) end
184
185 ---Send focused window to monitor
186 ---@param dir integer Direction (-1 for previous, 1 for next)
187 ---@return table Action table for keybinding
188 function oxwm.monitor.tag(dir) end
189
190 ---Layout management module
191 ---@class oxwm.layout
192 oxwm.layout = {}
193
194 ---Cycle through layouts
195 ---@return table Action table for keybinding
196 function oxwm.layout.cycle() end
197
198 ---Set specific layout
199 ---@param name string Layout name (e.g., "tiling", "normie", "tabbed", "grid", "monocle", "scrolling")
200 ---@return table Action table for keybinding
201 function oxwm.layout.set(name) end
202
203 ---Scroll layout left (for scrolling layout)
204 ---@return table Action table for keybinding
205 function oxwm.layout.scroll_left() end
206
207 ---Scroll layout right (for scrolling layout)
208 ---@return table Action table for keybinding
209 function oxwm.layout.scroll_right() end
210
211 ---Tag/workspace management module
212 ---@class oxwm.tag
213 oxwm.tag = {}
214
215 ---View/switch to tag
216 ---@param index integer Tag index (0-based)
217 ---@return table Action table for keybinding
218 function oxwm.tag.view(index) end
219
220 ---View/switch to next tag
221 ---@return table Action table for keybinding
222 function oxwm.tag.view_next() end
223
224 ---View/switch to previous tag
225 ---@return table Action table for keybinding
226 function oxwm.tag.view_previous() end
227
228 ---View/switch to next non-empty tag
229 ---@return table Action table for keybinding
230 function oxwm.tag.view_next_nonempty() end
231
232 ---View/switch to previous non-empty tag
233 ---@return table Action table for keybinding
234 function oxwm.tag.view_previous_nonempty() end
235
236 ---Move focused window to tag
237 ---@param index integer Tag index (0-based)
238 ---@return table Action table for keybinding
239 function oxwm.tag.move_to(index) end
240
241 ---Toggle viewing a tag (allows viewing multiple tags at once)
242 ---@param index integer Tag index (0-based)
243 ---@return table Action table for keybinding
244 function oxwm.tag.toggleview(index) end
245
246 ---Toggle tag on focused window (allows window to appear on multiple tags)
247 ---@param index integer Tag index (0-based)
248 ---@return table Action table for keybinding
249 function oxwm.tag.toggletag(index) end
250
251 ---When enabled an attempt to view the current tag switches back to the previously viewed tag.
252 ---@param enabled boolean Enable or disable tag_back_and_forth
253 function oxwm.tag.set_back_and_forth(enabled) end
254
255 ---Status bar configuration module
256 ---@class oxwm.bar
257 oxwm.bar = {}
258
259 ---Set status bar font
260 ---@param font string Font string (e.g., "monospace:style=Bold:size=10")
261 function oxwm.bar.set_font(font) end
262
263 ---DEPRECATED: Add a status bar block (use oxwm.bar.set_blocks with block constructors instead)
264 ---@deprecated
265 ---@param format string Format string with {} placeholders
266 ---@param command "DateTime"|"Shell"|"Ram"|"Static" Block command type (Battery not supported)
267 ---@param arg string|nil Command argument (format for DateTime, command for Shell, text for Static, nil for Ram)
268 ---@param interval integer Update interval in seconds
269 ---@param color string|integer Color as hex string or integer
270 ---@param underline boolean Whether to underline the block
271 function oxwm.bar.add_block(format, command, arg, interval, color, underline) end
272
273 ---Set status bar blocks using block constructors
274 ---@param blocks table[] Array of block configurations created with oxwm.bar.block.*
275 function oxwm.bar.set_blocks(blocks) end
276
277 ---Block constructors module
278 ---@class oxwm.bar.block
279 oxwm.bar.block = {}
280
281 ---Create a RAM usage block
282 ---@param config {format: string, interval: integer, color: string|integer, underline: boolean} Block configuration
283 ---@return table Block configuration
284 function oxwm.bar.block.ram(config) end
285
286 ---Create a date/time block
287 ---@param config {format: string, date_format: string, interval: integer, color: string|integer, underline: boolean} Block configuration (format is display template with {}, date_format is strftime format)
288 ---@return table Block configuration
289 function oxwm.bar.block.datetime(config) end
290
291 ---Create a shell command block
292 ---@param config {format: string, command: string, interval: integer, color: string|integer, underline: boolean} Block configuration
293 ---@return table Block configuration
294 function oxwm.bar.block.shell(config) end
295
296 ---Create a static text block
297 ---@param config {format: string, text: string, interval: integer, color: string|integer, underline: boolean} Block configuration
298 ---@return table Block configuration
299 function oxwm.bar.block.static(config) end
300
301 ---Create a battery status block
302 ---@param config {format: string, charging: string, discharging: string, full: string, interval: integer, color: string|integer, underline: boolean, battery_name: string} Block configuration
303 ---@return table Block configuration
304 function oxwm.bar.block.battery(config) end
305
306 ---Set normal tag color scheme (unselected, no windows)
307 ---@param foreground string|integer Foreground color
308 ---@param background string|integer Background color
309 ---@param underline string|integer Underline color
310 function oxwm.bar.set_scheme_normal(foreground, background, underline) end
311
312 ---Set occupied tag color scheme (unselected, has windows)
313 ---@param foreground string|integer Foreground color
314 ---@param background string|integer Background color
315 ---@param underline string|integer Underline color
316 function oxwm.bar.set_scheme_occupied(foreground, background, underline) end
317
318 ---Set selected tag color scheme (currently selected tag)
319 ---@param foreground string|integer Foreground color
320 ---@param background string|integer Background color
321 ---@param underline string|integer Underline color
322 function oxwm.bar.set_scheme_selected(foreground, background, underline) end
323
324 ---Set urgent tag color scheme (tags with urgent windows)
325 ---@param foreground string|integer Foreground color
326 ---@param background string|integer Background color
327 ---@param underline string|integer Underline color
328 function oxwm.bar.set_scheme_urgent(foreground, background, underline) end
329
330 ---Hide tags that have no windows and are not currently selected
331 ---@param hide boolean Whether to hide vacant tags
332 function oxwm.bar.set_hide_vacant_tags(hide) end
333
334 ---Add an autostart command
335 ---@param cmd string Command to run at startup
336 function oxwm.autostart(cmd) end