oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git
11,167 bytes raw
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
---Set layout symbol override
45
---@param name string Layout name (e.g., "tiling", "normie", "tabbed", "grid", "monocle")
46
---@param symbol string Symbol to display (e.g., "[T]", "[F]", "[=]")
47
function oxwm.set_layout_symbol(name, symbol) end
48
49
---Window rule module
50
---@class oxwm.rule
51
oxwm.rule = {}
52
53
---Add a window rule
54
---@param rule {class: string?, instance: string?, title: string?, role: string?, floating: boolean?, tag: integer?, fullscreen: boolean?} Rule configuration
55
function oxwm.rule.add(rule) end
56
57
---Quit the window manager
58
---@return table Action table for keybinding
59
function oxwm.quit() end
60
61
---Restart the window manager
62
---@return table Action table for keybinding
63
function oxwm.restart() end
64
65
---Recompile the window manager
66
---@return table Action table for keybinding
67
function oxwm.recompile() end
68
69
---Toggle gaps on/off
70
---@return table Action table for keybinding
71
function oxwm.toggle_gaps() end
72
73
---Show keybind overlay
74
---@return table Action table for keybinding
75
function oxwm.show_keybinds() end
76
77
---Set master area factor (adjust master window width in tiling layout)
78
---@param delta integer Delta to adjust by (negative to decrease, positive to increase)
79
---@return table Action table for keybinding
80
function oxwm.set_master_factor(delta) end
81
82
---Increment/decrement number of master windows
83
---@param delta integer Delta to adjust by (negative to decrease, positive to increase)
84
---@return table Action table for keybinding
85
function oxwm.inc_num_master(delta) end
86
87
---Keybinding module
88
---@class oxwm.key
89
oxwm.key = {}
90
91
---Bind a key combination to an action
92
---@param modifiers string|string[] Modifier keys (e.g., {"Mod4"}, {"Mod4", "Shift"})
93
---@param key string Key name (e.g., "Return", "Q", "1")
94
---@param action table Action returned by oxwm functions
95
function oxwm.key.bind(modifiers, key, action) end
96
97
---Bind a keychord (multi-key sequence) to an action
98
---@param keys table[] Array of key presses, each: {{modifiers}, key}
99
---@param action table Action returned by oxwm functions
100
function oxwm.key.chord(keys, action) end
101
102
---Gap configuration module
103
---@class oxwm.gaps
104
oxwm.gaps = {}
105
106
---Set gaps enabled/disabled
107
---@param enabled boolean Enable or disable gaps
108
function oxwm.gaps.set_enabled(enabled) end
109
110
---Enable gaps
111
function oxwm.gaps.enable() end
112
113
---Disable gaps
114
function oxwm.gaps.disable() end
115
116
---Set inner gaps
117
---@param horizontal integer Horizontal inner gap in pixels
118
---@param vertical integer Vertical inner gap in pixels
119
function oxwm.gaps.set_inner(horizontal, vertical) end
120
121
---Set outer gaps
122
---@param horizontal integer Horizontal outer gap in pixels
123
---@param vertical integer Vertical outer gap in pixels
124
function oxwm.gaps.set_outer(horizontal, vertical) end
125
126
---Set smart gaps (disable outer gaps when only one window visible)
127
---@param enabled boolean Enable or disable smart gaps
128
function oxwm.gaps.set_smart(enabled) end
129
130
---Border configuration module
131
---@class oxwm.border
132
oxwm.border = {}
133
134
---Set border width
135
---@param width integer Border width in pixels
136
function oxwm.border.set_width(width) end
137
138
---Set focused window border color
139
---@param color string|integer Color as hex string ("#ff0000", "0xff0000") or integer
140
function oxwm.border.set_focused_color(color) end
141
142
---Set unfocused window border color
143
---@param color string|integer Color as hex string ("#666666", "0x666666") or integer
144
function oxwm.border.set_unfocused_color(color) end
145
146
---Client/window management module
147
---@class oxwm.client
148
oxwm.client = {}
149
150
---Kill the focused window
151
---@return table Action table for keybinding
152
function oxwm.client.kill() end
153
154
---Toggle fullscreen mode
155
---@return table Action table for keybinding
156
function oxwm.client.toggle_fullscreen() end
157
158
---Toggle floating mode
159
---@return table Action table for keybinding
160
function oxwm.client.toggle_floating() end
161
162
---Focus stack (next/previous window)
163
---@param dir integer Direction (1 for next, -1 for previous)
164
---@return table Action table for keybinding
165
function oxwm.client.focus_stack(dir) end
166
167
---Move stack (next/previous window)
168
---@param dir integer Direction (1 for next, -1 for previous)
169
---@return table Action table for keybinding
170
function oxwm.client.move_stack(dir) end
171
172
---Monitor management module
173
---@class oxwm.monitor
174
oxwm.monitor = {}
175
176
---Focus monitor
177
---@param dir integer Direction (-1 for previous, 1 for next)
178
---@return table Action table for keybinding
179
function oxwm.monitor.focus(dir) end
180
181
---Send focused window to monitor
182
---@param dir integer Direction (-1 for previous, 1 for next)
183
---@return table Action table for keybinding
184
function oxwm.monitor.tag(dir) end
185
186
---Layout management module
187
---@class oxwm.layout
188
oxwm.layout = {}
189
190
---Cycle through layouts
191
---@return table Action table for keybinding
192
function oxwm.layout.cycle() end
193
194
---Set specific layout
195
---@param name string Layout name (e.g., "tiling", "normie", "tabbed", "grid", "monocle")
196
---@return table Action table for keybinding
197
function oxwm.layout.set(name) end
198
199
---Tag/workspace management module
200
---@class oxwm.tag
201
oxwm.tag = {}
202
203
---View/switch to tag
204
---@param index integer Tag index (0-based)
205
---@return table Action table for keybinding
206
function oxwm.tag.view(index) end
207
208
---View/switch to next tag
209
---@return table Action table for keybinding
210
function oxwm.tag.view_next() end
211
212
---View/switch to previous tag
213
---@return table Action table for keybinding
214
function oxwm.tag.view_previous() end
215
216
---View/switch to next non-empty tag
217
---@return table Action table for keybinding
218
function oxwm.tag.view_next_nonempty() end
219
220
---View/switch to previous non-empty tag
221
---@return table Action table for keybinding
222
function oxwm.tag.view_previous_nonempty() end
223
224
---Move focused window to tag
225
---@param index integer Tag index (0-based)
226
---@return table Action table for keybinding
227
function oxwm.tag.move_to(index) end
228
229
---Toggle viewing a tag (allows viewing multiple tags at once)
230
---@param index integer Tag index (0-based)
231
---@return table Action table for keybinding
232
function oxwm.tag.toggleview(index) end
233
234
---Toggle tag on focused window (allows window to appear on multiple tags)
235
---@param index integer Tag index (0-based)
236
---@return table Action table for keybinding
237
function oxwm.tag.toggletag(index) end
238
239
---When enabled an attempt to view the current tag switches back to the previously viewed tag.
240
---@param enabled boolean Enable or disable tag_back_and_forth
241
function oxwm.tag.set_back_and_forth(enabled) end
242
243
---Status bar configuration module
244
---@class oxwm.bar
245
oxwm.bar = {}
246
247
---Set status bar font
248
---@param font string Font string (e.g., "monospace:style=Bold:size=10")
249
function oxwm.bar.set_font(font) end
250
251
---DEPRECATED: Add a status bar block (use oxwm.bar.set_blocks with block constructors instead)
252
---@deprecated
253
---@param format string Format string with {} placeholders
254
---@param command "DateTime"|"Shell"|"Ram"|"Static" Block command type (Battery not supported)
255
---@param arg string|nil Command argument (format for DateTime, command for Shell, text for Static, nil for Ram)
256
---@param interval integer Update interval in seconds
257
---@param color string|integer Color as hex string or integer
258
---@param underline boolean Whether to underline the block
259
function oxwm.bar.add_block(format, command, arg, interval, color, underline) end
260
261
---Set status bar blocks using block constructors
262
---@param blocks table[] Array of block configurations created with oxwm.bar.block.*
263
function oxwm.bar.set_blocks(blocks) end
264
265
---Block constructors module
266
---@class oxwm.bar.block
267
oxwm.bar.block = {}
268
269
---Create a RAM usage block
270
---@param config {format: string, interval: integer, color: string|integer, underline: boolean} Block configuration
271
---@return table Block configuration
272
function oxwm.bar.block.ram(config) end
273
274
---Create a date/time block
275
---@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)
276
---@return table Block configuration
277
function oxwm.bar.block.datetime(config) end
278
279
---Create a shell command block
280
---@param config {format: string, command: string, interval: integer, color: string|integer, underline: boolean} Block configuration
281
---@return table Block configuration
282
function oxwm.bar.block.shell(config) end
283
284
---Create a static text block
285
---@param config {format: string, text: string, interval: integer, color: string|integer, underline: boolean} Block configuration
286
---@return table Block configuration
287
function oxwm.bar.block.static(config) end
288
289
---Create a battery status block
290
---@param config {format: string, charging: string, discharging: string, full: string, interval: integer, color: string|integer, underline: boolean, battery_name: string} Block configuration
291
---@return table Block configuration
292
function oxwm.bar.block.battery(config) end
293
294
---Set normal tag color scheme (unselected, no windows)
295
---@param foreground string|integer Foreground color
296
---@param background string|integer Background color
297
---@param underline string|integer Underline color
298
function oxwm.bar.set_scheme_normal(foreground, background, underline) end
299
300
---Set occupied tag color scheme (unselected, has windows)
301
---@param foreground string|integer Foreground color
302
---@param background string|integer Background color
303
---@param underline string|integer Underline color
304
function oxwm.bar.set_scheme_occupied(foreground, background, underline) end
305
306
---Set selected tag color scheme (currently selected tag)
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_selected(foreground, background, underline) end
311
312
---Add an autostart command
313
---@param cmd string Command to run at startup
314
function oxwm.autostart(cmd) end