Module general

General Module This module handles general configurations for the application.

Users can override these defaults by passing a table of options to `general.setup`.

Functions

setup (opts) Sets up the general configuration.
write (file) Saves the general configuration to a file.

Tables

defaults Default configuration options for the General Module.


Functions

setup (opts)
Sets up the general configuration. Merges user-provided options with the default settings and serializes the configuration.

Parameters:

  • opts table|nil A table containing configuration options to override defaults. Default is `nil`.

Usage:

    general.setup({
        border_size = 2,
        gaps_out = 25,
        col = {
            active_border = "0xff00ff00",
        },
    })
write (file)
Saves the general configuration to a file. Writes the serialized configuration to the provided file handle.

Parameters:

  • file userdata The file handle to write the configuration to. Typically obtained via `io.open`.

Usage:

    local file = io.open("config.lua", "w")
    general.write(file)
    file:close()

Tables

defaults
Default configuration options for the General Module. Users can override these defaults by passing a table of options to `general.setup`.

Fields:

  • border_size number Size of the window borders. Default is `1`.
  • no_border_on_floating boolean Disable borders on floating windows. Default is `false`.
  • gaps_in number Inner gaps between windows. Default is `5`.
  • gaps_out number Outer gaps between windows and the screen edges. Default is `20`.
  • gaps_workspaces number Gaps specific to workspaces. Default is `0`.
  • col table Color settings.
    • active_border string Hex color code for active window borders. Example: `"0xffffffff"`.
    • inactive_border string Hex color code for inactive window borders. Default is `"0xff444444"`.
    • nogroup_border string Hex color code for borders when no group is present. Default is `"0xffffaaff"`.
    • nogroup_border_active string Hex color code for active borders when no group is present. Default is `"0xffff00ff"`.
  • layout string Layout algorithm for window tiling. Default is `"dwindle"`.
  • no_focus_fallback boolean Disable fallback focus behavior. Default is `false`.
  • resize_on_border boolean Enable resizing windows by dragging borders. Default is `false`.
  • extend_border_grab_area number Extends the area for grabbing window borders. Default is `15`.
  • hover_icon_on_border boolean Show icons when hovering over borders. Default is `true`.
  • allow_tearing boolean Allow screen tearing. Default is `false`.
  • resize_corner number Size of the resize corner area. Default is `0`.
  • enabled boolean Enable snapping for floating window.
  • window_gap number Minimum gap in pixels between windows before snapping
  • monitor_gap number Minimum gap in pixels between window and monitor edges before snapping.
generated by LDoc 1.5.0 Last updated 2024-11-02 18:05:12