oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git
9,273 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
---Set layout symbol override
41
---@param name string Layout name (e.g., "tiling", "normie", "tabbed", "grid", "monocle")
42
---@param symbol string Symbol to display (e.g., "[T]", "[F]", "[=]")
43
function oxwm.set_layout_symbol(name, symbol) end
44
45
---Quit the window manager
46
---@return table Action table for keybinding
47
function oxwm.quit() end
48
49
---Restart the window manager
50
---@return table Action table for keybinding
51
function oxwm.restart() end
52
53
---Recompile the window manager
54
---@return table Action table for keybinding
55
function oxwm.recompile() end
56
57
---Toggle gaps on/off
58
---@return table Action table for keybinding
59
function oxwm.toggle_gaps() end
60
61
---Show keybind overlay
62
---@return table Action table for keybinding
63
function oxwm.show_keybinds() end
64
65
---Focus monitor by index
66
---@param index integer Monitor index (-1 for previous, 1 for next)
67
---@return table Action table for keybinding
68
function oxwm.focus_monitor(index) end
69
70
---Keybinding module
71
---@class oxwm.key
72
oxwm.key = {}
73
74
---Bind a key combination to an action
75
---@param modifiers string|string[] Modifier keys (e.g., {"Mod4"}, {"Mod4", "Shift"})
76
---@param key string Key name (e.g., "Return", "Q", "1")
77
---@param action table Action returned by oxwm functions
78
function oxwm.key.bind(modifiers, key, action) end
79
80
---Bind a keychord (multi-key sequence) to an action
81
---@param keys table[] Array of key presses, each: {{modifiers}, key}
82
---@param action table Action returned by oxwm functions
83
function oxwm.key.chord(keys, action) end
84
85
---Gap configuration module
86
---@class oxwm.gaps
87
oxwm.gaps = {}
88
89
---Set gaps enabled/disabled
90
---@param enabled boolean Enable or disable gaps
91
function oxwm.gaps.set_enabled(enabled) end
92
93
---Enable gaps
94
function oxwm.gaps.enable() end
95
96
---Disable gaps
97
function oxwm.gaps.disable() end
98
99
---Set inner gaps
100
---@param horizontal integer Horizontal inner gap in pixels
101
---@param vertical integer Vertical inner gap in pixels
102
function oxwm.gaps.set_inner(horizontal, vertical) end
103
104
---Set outer gaps
105
---@param horizontal integer Horizontal outer gap in pixels
106
---@param vertical integer Vertical outer gap in pixels
107
function oxwm.gaps.set_outer(horizontal, vertical) end
108
109
---Border configuration module
110
---@class oxwm.border
111
oxwm.border = {}
112
113
---Set border width
114
---@param width integer Border width in pixels
115
function oxwm.border.set_width(width) end
116
117
---Set focused window border color
118
---@param color string|integer Color as hex string ("#ff0000", "0xff0000") or integer
119
function oxwm.border.set_focused_color(color) end
120
121
---Set unfocused window border color
122
---@param color string|integer Color as hex string ("#666666", "0x666666") or integer
123
function oxwm.border.set_unfocused_color(color) end
124
125
---Client/window management module
126
---@class oxwm.client
127
oxwm.client = {}
128
129
---Kill the focused window
130
---@return table Action table for keybinding
131
function oxwm.client.kill() end
132
133
---Toggle fullscreen mode
134
---@return table Action table for keybinding
135
function oxwm.client.toggle_fullscreen() end
136
137
---Toggle floating mode
138
---@return table Action table for keybinding
139
function oxwm.client.toggle_floating() end
140
141
---Focus window in direction
142
---@param direction "up"|"down"|"left"|"right" Direction to focus
143
---@return table Action table for keybinding
144
function oxwm.client.focus_direction(direction) end
145
146
---Swap window in direction
147
---@param direction "up"|"down"|"left"|"right" Direction to swap
148
---@return table Action table for keybinding
149
function oxwm.client.swap_direction(direction) end
150
151
---Smart move window (move or swap)
152
---@param direction "up"|"down"|"left"|"right" Direction to move
153
---@return table Action table for keybinding
154
function oxwm.client.smart_move(direction) end
155
156
---Focus stack (next/previous window)
157
---@param dir integer Direction (1 for next, -1 for previous)
158
---@return table Action table for keybinding
159
function oxwm.client.focus_stack(dir) end
160
161
---Exchange client positions
162
---@return table Action table for keybinding
163
function oxwm.client.exchange() end
164
165
---Layout management module
166
---@class oxwm.layout
167
oxwm.layout = {}
168
169
---Cycle through layouts
170
---@return table Action table for keybinding
171
function oxwm.layout.cycle() end
172
173
---Set specific layout
174
---@param name string Layout name (e.g., "tiling", "normie", "tabbed", "grid", "monocle")
175
---@return table Action table for keybinding
176
function oxwm.layout.set(name) end
177
178
---Tag/workspace management module
179
---@class oxwm.tag
180
oxwm.tag = {}
181
182
---View/switch to tag
183
---@param index integer Tag index (0-based)
184
---@return table Action table for keybinding
185
function oxwm.tag.view(index) end
186
187
---Move focused window to tag
188
---@param index integer Tag index (0-based)
189
---@return table Action table for keybinding
190
function oxwm.tag.move_to(index) end
191
192
---Status bar configuration module
193
---@class oxwm.bar
194
oxwm.bar = {}
195
196
---Set status bar font
197
---@param font string Font string (e.g., "monospace:style=Bold:size=10")
198
function oxwm.bar.set_font(font) end
199
200
---DEPRECATED: Add a status bar block (use oxwm.bar.set_blocks with block constructors instead)
201
---@deprecated
202
---@param format string Format string with {} placeholders
203
---@param command "DateTime"|"Shell"|"Ram"|"Static" Block command type (Battery not supported)
204
---@param arg string|nil Command argument (format for DateTime, command for Shell, text for Static, nil for Ram)
205
---@param interval integer Update interval in seconds
206
---@param color string|integer Color as hex string or integer
207
---@param underline boolean Whether to underline the block
208
function oxwm.bar.add_block(format, command, arg, interval, color, underline) end
209
210
---Set status bar blocks using block constructors
211
---@param blocks table[] Array of block configurations created with oxwm.bar.block.*
212
function oxwm.bar.set_blocks(blocks) end
213
214
---Block constructors module
215
---@class oxwm.bar.block
216
oxwm.bar.block = {}
217
218
---Create a RAM usage block
219
---@param config {format: string, interval: integer, color: string|integer, underline: boolean} Block configuration
220
---@return table Block configuration
221
function oxwm.bar.block.ram(config) end
222
223
---Create a date/time block
224
---@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)
225
---@return table Block configuration
226
function oxwm.bar.block.datetime(config) end
227
228
---Create a shell command block
229
---@param config {format: string, command: string, interval: integer, color: string|integer, underline: boolean} Block configuration
230
---@return table Block configuration
231
function oxwm.bar.block.shell(config) end
232
233
---Create a static text block
234
---@param config {format: string, text: string, interval: integer, color: string|integer, underline: boolean} Block configuration
235
---@return table Block configuration
236
function oxwm.bar.block.static(config) end
237
238
---Create a battery status block
239
---@param config {format: string, charging: string, discharging: string, full: string, interval: integer, color: string|integer, underline: boolean} Block configuration
240
---@return table Block configuration
241
function oxwm.bar.block.battery(config) end
242
243
---Set normal tag color scheme (unselected, no windows)
244
---@param foreground string|integer Foreground color
245
---@param background string|integer Background color
246
---@param underline string|integer Underline color
247
function oxwm.bar.set_scheme_normal(foreground, background, underline) end
248
249
---Set occupied tag color scheme (unselected, has windows)
250
---@param foreground string|integer Foreground color
251
---@param background string|integer Background color
252
---@param underline string|integer Underline color
253
function oxwm.bar.set_scheme_occupied(foreground, background, underline) end
254
255
---Set selected tag color scheme (currently selected tag)
256
---@param foreground string|integer Foreground color
257
---@param background string|integer Background color
258
---@param underline string|integer Underline color
259
function oxwm.bar.set_scheme_selected(foreground, background, underline) end
260
261
---Add an autostart command
262
---@param cmd string Command to run at startup
263
function oxwm.autostart(cmd) end