---@meta

---OXWM Configuration API Type Definitions
---
---DO NOT EDIT THIS FILE
---This file is automatically generated and managed by OXWM.
---It will be overwritten on every OXWM update to match the running version.
---
---Location: ~/.config/oxwm/lib/oxwm.lua
---Configured via: ~/.config/oxwm/.luarc.json
---
---This file provides LSP autocomplete and type checking for your config.lua.
---To use it, add this to the top of your config.lua:
---  ---@module 'oxwm'
---
---@class oxwm
oxwm = {}

---Spawn a command
---@param cmd string|string[] Command to spawn (string or array of strings)
---@return table Action table for keybinding
function oxwm.spawn(cmd) end

---Spawn the configured terminal emulator
---@return table Action table for keybinding
function oxwm.spawn_terminal() end

---Set the terminal emulator
---@param terminal string Terminal command (e.g., "st", "alacritty")
function oxwm.set_terminal(terminal) end

---Set the modifier key
---@param modkey string Modifier key ("Mod1", "Mod4", "Shift", "Control")
function oxwm.set_modkey(modkey) end

---Set workspace tags
---@param tags string[] Array of tag names
function oxwm.set_tags(tags) end

---Enable or disable automatic tiling of new windows
---@param enabled boolean Enable or disable auto-tiling
function oxwm.auto_tile(enabled) end

---Enable or disable tiled resize mode (Mod+RMB adjusts mfact instead of floating)
---@param enabled boolean Enable or disable tiled resize mode
function oxwm.tiled_resize_mode(enabled) end

---Set layout symbol override
---@param name string Layout name (e.g., "tiling", "normie", "tabbed", "grid", "monocle", "dwindle")
---@param symbol string Symbol to display (e.g., "[T]", "[F]", "[=]", "[\\]")
function oxwm.set_layout_symbol(name, symbol) end

---Set default layout for all tags
---@param name string Layout name ("tiling", "floating", "scrolling", "grid", "monocle", "dwindle", or aliases: "tile", "float", "scroll", "normie", "fib", "fibonacci")
function oxwm.set_layout(name) end

---Set default layout for a specific tag
---@param tag integer Tag index (1-9)
---@param name string Layout name ("tiling", "floating", "scrolling", "grid", "monocle", "dwindle", or aliases)
function oxwm.set_tag_layout(tag, name) end

---Set floating window spawn position
---@param position string Position ("center", "top-left", "top-right", "bottom-left", "bottom-right", "top-center", "bottom-center", "center-left", "center-right", or underscore variants)
function oxwm.set_floating_position(position) end

---Toggle the status bar visibility
---@return table Action table for keybinding
function oxwm.toggle_bar() end

---Window rule module
---@class oxwm.rule
oxwm.rule = {}

---Add a window rule
---@param rule {class: string?, instance: string?, title: string?, role: string?, floating: boolean?, tag: integer?, fullscreen: boolean?, focus: boolean?} Rule configuration
function oxwm.rule.add(rule) end

---Quit the window manager
---@return table Action table for keybinding
function oxwm.quit() end

---Restart the window manager
---@return table Action table for keybinding
function oxwm.restart() end

---Recompile the window manager
---@return table Action table for keybinding
function oxwm.recompile() end

---Toggle gaps on/off
---@return table Action table for keybinding
function oxwm.toggle_gaps() end

---Show keybind overlay
---@return table Action table for keybinding
function oxwm.show_keybinds() end

---Set master area factor (adjust master window width in tiling layout)
---@param delta integer Delta to adjust by (negative to decrease, positive to increase)
---@return table Action table for keybinding
function oxwm.set_master_factor(delta) end

---Increment/decrement number of master windows
---@param delta integer Delta to adjust by (negative to decrease, positive to increase)
---@return table Action table for keybinding
function oxwm.inc_num_master(delta) end

---Keybinding module
---@class oxwm.key
oxwm.key = {}

---Bind a key combination to an action
---@param modifiers string|string[] Modifier keys (e.g., {"Mod4"}, {"Mod4", "Shift"})
---@param key string Key name (e.g., "Return", "Q", "1")
---@param action table Action returned by oxwm functions
function oxwm.key.bind(modifiers, key, action) end

---Bind a keychord (multi-key sequence) to an action
---@param keys table[] Array of key presses, each: {{modifiers}, key}
---@param action table Action returned by oxwm functions
function oxwm.key.chord(keys, action) end

---Gap configuration module
---@class oxwm.gaps
oxwm.gaps = {}

---Set gaps enabled/disabled
---@param enabled boolean Enable or disable gaps
function oxwm.gaps.set_enabled(enabled) end

---Enable gaps
function oxwm.gaps.enable() end

---Disable gaps
function oxwm.gaps.disable() end

---Set inner gaps
---@param horizontal integer Horizontal inner gap in pixels
---@param vertical integer Vertical inner gap in pixels
function oxwm.gaps.set_inner(horizontal, vertical) end

---Set outer gaps
---@param horizontal integer Horizontal outer gap in pixels
---@param vertical integer Vertical outer gap in pixels
function oxwm.gaps.set_outer(horizontal, vertical) end

---Set smart gaps (disable outer gaps when only one window visible)
---@param enabled boolean Enable or disable smart gaps
function oxwm.gaps.set_smart(enabled) end

---Border configuration module
---@class oxwm.border
oxwm.border = {}

---Set border width
---@param width integer Border width in pixels
function oxwm.border.set_width(width) end

---Set focused window border color
---@param color string|integer Color as hex string ("#ff0000", "0xff0000") or integer
function oxwm.border.set_focused_color(color) end

---Set unfocused window border color
---@param color string|integer Color as hex string ("#666666", "0x666666") or integer
function oxwm.border.set_unfocused_color(color) end

---Client/window management module
---@class oxwm.client
oxwm.client = {}

---Kill the focused window
---@return table Action table for keybinding
function oxwm.client.kill() end

---Toggle fullscreen mode
---@return table Action table for keybinding
function oxwm.client.toggle_fullscreen() end

---Toggle floating mode
---@return table Action table for keybinding
function oxwm.client.toggle_floating() end

---Focus stack (next/previous window)
---@param dir integer Direction (1 for next, -1 for previous)
---@return table Action table for keybinding
function oxwm.client.focus_stack(dir) end

---Move stack (next/previous window)
---@param dir integer Direction (1 for next, -1 for previous)
---@return table Action table for keybinding
function oxwm.client.move_stack(dir) end

---Monitor management module
---@class oxwm.monitor
oxwm.monitor = {}

---Focus monitor
---@param dir integer Direction (-1 for previous, 1 for next)
---@return table Action table for keybinding
function oxwm.monitor.focus(dir) end

---Send focused window to monitor
---@param dir integer Direction (-1 for previous, 1 for next)
---@return table Action table for keybinding
function oxwm.monitor.tag(dir) end

---Layout management module
---@class oxwm.layout
oxwm.layout = {}

---Cycle through layouts
---@return table Action table for keybinding
function oxwm.layout.cycle() end

---Set specific layout
---@param name string Layout name (e.g., "tiling", "normie", "tabbed", "grid", "monocle", "scrolling", "dwindle")
---@return table Action table for keybinding
function oxwm.layout.set(name) end

---Scroll layout left (for scrolling layout)
---@return table Action table for keybinding
function oxwm.layout.scroll_left() end

---Scroll layout right (for scrolling layout)
---@return table Action table for keybinding
function oxwm.layout.scroll_right() end

---Tag/workspace management module
---@class oxwm.tag
oxwm.tag = {}

---View/switch to tag
---@param index integer Tag index (0-based)
---@return table Action table for keybinding
function oxwm.tag.view(index) end

---View/switch to next tag
---@return table Action table for keybinding
function oxwm.tag.view_next() end

---View/switch to previous tag
---@return table Action table for keybinding
function oxwm.tag.view_previous() end

---View/switch to next non-empty tag
---@return table Action table for keybinding
function oxwm.tag.view_next_nonempty() end

---View/switch to previous non-empty tag
---@return table Action table for keybinding
function oxwm.tag.view_previous_nonempty() end

---Move focused window to tag
---@param index integer Tag index (0-based)
---@return table Action table for keybinding
function oxwm.tag.move_to(index) end

---Toggle viewing a tag (allows viewing multiple tags at once)
---@param index integer Tag index (0-based)
---@return table Action table for keybinding
function oxwm.tag.toggleview(index) end

---Toggle tag on focused window (allows window to appear on multiple tags)
---@param index integer Tag index (0-based)
---@return table Action table for keybinding
function oxwm.tag.toggletag(index) end

---When enabled an attempt to view the current tag switches back to the previously viewed tag.
---@param enabled boolean Enable or disable tag_back_and_forth
function oxwm.tag.set_back_and_forth(enabled) end

---Status bar configuration module
---@class oxwm.bar
oxwm.bar = {}

---Set status bar font
---@param font string Font string (e.g., "monospace:style=Bold:size=10")
function oxwm.bar.set_font(font) end

---Set status bar position
---@param position string Bar position ("top" or "bottom")
function oxwm.bar.set_position(position) end

---DEPRECATED: Add a status bar block (use oxwm.bar.set_blocks with block constructors instead)
---@deprecated
---@param format string Format string with {} placeholders
---@param command "DateTime"|"Shell"|"Ram"|"Static" Block command type (Battery not supported)
---@param arg string|nil Command argument (format for DateTime, command for Shell, text for Static, nil for Ram)
---@param interval integer Update interval in seconds
---@param color string|integer Color as hex string or integer
---@param underline boolean Whether to underline the block
function oxwm.bar.add_block(format, command, arg, interval, color, underline) end

---Set status bar blocks using block constructors
---@param blocks table[] Array of block configurations created with oxwm.bar.block.*
function oxwm.bar.set_blocks(blocks) end

---Block constructors module
---@class oxwm.bar.block
oxwm.bar.block = {}

---Create a RAM usage block
---@param config {format: string, interval: integer, color: string|integer, underline: boolean, click: string|{command: string, floating: boolean?, bypass_rules: boolean?}?} Block configuration
---@return table Block configuration
function oxwm.bar.block.ram(config) end

---Create a date/time block
---@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)
---@return table Block configuration
function oxwm.bar.block.datetime(config) end

---Create a shell command block
---@param config {format: string, command: string, interval: integer, color: string|integer, underline: boolean, click: string|{command: string, floating: boolean?, bypass_rules: boolean?}?} Block configuration
---@return table Block configuration
function oxwm.bar.block.shell(config) end

---Create a static text block
---@param config {format: string, text: string, interval: integer, color: string|integer, underline: boolean, click: string|{command: string, floating: boolean?, bypass_rules: boolean?}?} Block configuration
---@return table Block configuration
function oxwm.bar.block.static(config) end

---Create a battery status block
---@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
---@return table Block configuration
function oxwm.bar.block.battery(config) end

---Create a system tray block. Including this block enables the tray on the first bar; omitting it disables the tray entirely.
---@param config {color: string|integer, underline: boolean}? Optional appearance config (only color and underline are used)
---@return table Block configuration
function oxwm.bar.block.systray(config) end

---Set normal tag color scheme (unselected, no windows)
---@param foreground string|integer Foreground color
---@param background string|integer Background color
---@param underline string|integer Underline color
function oxwm.bar.set_scheme_normal(foreground, background, underline) end

---Set occupied tag color scheme (unselected, has windows)
---@param foreground string|integer Foreground color
---@param background string|integer Background color
---@param underline string|integer Underline color
function oxwm.bar.set_scheme_occupied(foreground, background, underline) end

---Set selected tag color scheme (currently selected tag)
---@param foreground string|integer Foreground color
---@param background string|integer Background color
---@param underline string|integer Underline color
function oxwm.bar.set_scheme_selected(foreground, background, underline) end

---Set urgent tag color scheme (tags with urgent windows)
---@param foreground string|integer Foreground color
---@param background string|integer Background color
---@param underline string|integer Underline color
function oxwm.bar.set_scheme_urgent(foreground, background, underline) end

---Hide tags that have no windows and are not currently selected
---@param hide boolean Whether to hide vacant tags
function oxwm.bar.set_hide_vacant_tags(hide) end

---Add an autostart command
---@param cmd string Command to run at startup
function oxwm.autostart(cmd) end
