oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git
10,958 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
---Status bar configuration module
240
---@class oxwm.bar
241
oxwm.bar = {}
242
243
---Set status bar font
244
---@param font string Font string (e.g., "monospace:style=Bold:size=10")
245
function oxwm.bar.set_font(font) end
246
247
---DEPRECATED: Add a status bar block (use oxwm.bar.set_blocks with block constructors instead)
248
---@deprecated
249
---@param format string Format string with {} placeholders
250
---@param command "DateTime"|"Shell"|"Ram"|"Static" Block command type (Battery not supported)
251
---@param arg string|nil Command argument (format for DateTime, command for Shell, text for Static, nil for Ram)
252
---@param interval integer Update interval in seconds
253
---@param color string|integer Color as hex string or integer
254
---@param underline boolean Whether to underline the block
255
function oxwm.bar.add_block(format, command, arg, interval, color, underline) end
256
257
---Set status bar blocks using block constructors
258
---@param blocks table[] Array of block configurations created with oxwm.bar.block.*
259
function oxwm.bar.set_blocks(blocks) end
260
261
---Block constructors module
262
---@class oxwm.bar.block
263
oxwm.bar.block = {}
264
265
---Create a RAM usage block
266
---@param config {format: string, interval: integer, color: string|integer, underline: boolean} Block configuration
267
---@return table Block configuration
268
function oxwm.bar.block.ram(config) end
269
270
---Create a date/time block
271
---@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)
272
---@return table Block configuration
273
function oxwm.bar.block.datetime(config) end
274
275
---Create a shell command block
276
---@param config {format: string, command: string, interval: integer, color: string|integer, underline: boolean} Block configuration
277
---@return table Block configuration
278
function oxwm.bar.block.shell(config) end
279
280
---Create a static text block
281
---@param config {format: string, text: string, interval: integer, color: string|integer, underline: boolean} Block configuration
282
---@return table Block configuration
283
function oxwm.bar.block.static(config) end
284
285
---Create a battery status block
286
---@param config {format: string, charging: string, discharging: string, full: string, interval: integer, color: string|integer, underline: boolean, battery_name: string} Block configuration
287
---@return table Block configuration
288
function oxwm.bar.block.battery(config) end
289
290
---Set normal tag color scheme (unselected, no windows)
291
---@param foreground string|integer Foreground color
292
---@param background string|integer Background color
293
---@param underline string|integer Underline color
294
function oxwm.bar.set_scheme_normal(foreground, background, underline) end
295
296
---Set occupied tag color scheme (unselected, has windows)
297
---@param foreground string|integer Foreground color
298
---@param background string|integer Background color
299
---@param underline string|integer Underline color
300
function oxwm.bar.set_scheme_occupied(foreground, background, underline) end
301
302
---Set selected tag color scheme (currently selected tag)
303
---@param foreground string|integer Foreground color
304
---@param background string|integer Background color
305
---@param underline string|integer Underline color
306
function oxwm.bar.set_scheme_selected(foreground, background, underline) end
307
308
---Add an autostart command
309
---@param cmd string Command to run at startup
310
function oxwm.autostart(cmd) end