tony / oxwm

Added docs for oxwm.lua lsp hints. Browse files
tonybanters committed 2026-03-30 parent 8e047c5 commit 5cb4f4d2a0fa9ac9ca6150235eb59aceb4c8aff6
Showing 1 changed file with 26 additions and 5 deletions. UnifiedSplit
+26 −5 templates/oxwm.lua
@@ -46,6 +46,23 @@ function oxwm.auto_tile(enabled) end
46 46 ---@param symbol string Symbol to display (e.g., "[T]", "[F]", "[=]")
47 47 function oxwm.set_layout_symbol(name, symbol) end
48 48
49 +---Set default layout for all tags
50 +---@param name string Layout name ("tiling", "floating", "scrolling", "grid", "monocle", or aliases: "tile", "float", "scroll", "normie")
51 +function oxwm.set_layout(name) end
52 +
53 +---Set default layout for a specific tag
54 +---@param tag integer Tag index (1-9)
55 +---@param name string Layout name ("tiling", "floating", "scrolling", "grid", "monocle", or aliases)
56 +function oxwm.set_tag_layout(tag, name) end
57 +
58 +---Set floating window spawn position
59 +---@param position string Position ("center", "top-left", "top-right", "bottom-left", "bottom-right", "top-center", "bottom-center", "center-left", "center-right", or underscore variants)
60 +function oxwm.set_floating_position(position) end
61 +
62 +---Toggle the status bar visibility
63 +---@return table Action table for keybinding
64 +function oxwm.toggle_bar() end
65 +
49 66 ---Window rule module
50 67 ---@class oxwm.rule
51 68 oxwm.rule = {}
@@ -256,6 +273,10 @@ oxwm.bar = {}
256 273 ---@param font string Font string (e.g., "monospace:style=Bold:size=10")
257 274 function oxwm.bar.set_font(font) end
258 275
276 +---Set status bar position
277 +---@param position string Bar position ("top" or "bottom")
278 +function oxwm.bar.set_position(position) end
279 +
259 280 ---DEPRECATED: Add a status bar block (use oxwm.bar.set_blocks with block constructors instead)
260 281 ---@deprecated
261 282 ---@param format string Format string with {} placeholders
@@ -275,27 +296,27 @@ function oxwm.bar.set_blocks(blocks) end
275 296 oxwm.bar.block = {}
276 297
277 298 ---Create a RAM usage block
278 ----@param config {format: string, interval: integer, color: string|integer, underline: boolean} Block configuration
299 +---@param config {format: string, interval: integer, color: string|integer, underline: boolean, click: string|{command: string, floating: boolean?, bypass_rules: boolean?}?} Block configuration
279 300 ---@return table Block configuration
280 301 function oxwm.bar.block.ram(config) end
281 302
282 303 ---Create a date/time block
283 ----@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)
304 +---@param config {format: string, date_format: string, interval: integer, color: string|integer, underline: boolean, click: string|{command: string, floating: boolean?, bypass_rules: boolean?}?} Block configuration (format is display template with {}, date_format is strftime format)
284 305 ---@return table Block configuration
285 306 function oxwm.bar.block.datetime(config) end
286 307
287 308 ---Create a shell command block
288 ----@param config {format: string, command: string, interval: integer, color: string|integer, underline: boolean} Block configuration
309 +---@param config {format: string, command: string, interval: integer, color: string|integer, underline: boolean, click: string|{command: string, floating: boolean?, bypass_rules: boolean?}?} Block configuration
289 310 ---@return table Block configuration
290 311 function oxwm.bar.block.shell(config) end
291 312
292 313 ---Create a static text block
293 ----@param config {format: string, text: string, interval: integer, color: string|integer, underline: boolean} Block configuration
314 +---@param config {format: string, text: string, interval: integer, color: string|integer, underline: boolean, click: string|{command: string, floating: boolean?, bypass_rules: boolean?}?} Block configuration
294 315 ---@return table Block configuration
295 316 function oxwm.bar.block.static(config) end
296 317
297 318 ---Create a battery status block
298 ----@param config {format: string, charging: string, discharging: string, full: string, interval: integer, color: string|integer, underline: boolean, battery_name: string} Block configuration
319 +---@param config {format: string, charging: string, discharging: string, full: string, interval: integer, color: string|integer, underline: boolean, battery_name: string, click: string|{command: string, floating: boolean?, bypass_rules: boolean?}?} Block configuration
299 320 ---@return table Block configuration
300 321 function oxwm.bar.block.battery(config) end
301 322