Module: config
High level interface to the private __cwc_config
global table.
any write on the config table will automatically be taken care of, so no need to manually call cwc.commit.
Usage:
local config = require("config") config["cursor_size"] = 25 config["cursor_edge_snapping_overlay_color"] = { 0.1, 0.2, 0.3, 0.05 }
Info:
- Copyright: 2025
- License: GPLv3
-
Originally authored by: Dwi Asmoro Bangun
(Full contributors list available on our github project)
Static module functions
config.init (src) -> boolean | Merge source table to the config table. | |
config.color_check (item) -> boolean | Check if item is created from gears.color. | |
config.positive (item) -> boolean | Check if item is a positive number. | |
config.check_enum (item, enum_table) -> function | Return a function that will check if item is a part of the passed enum table. | |
config.sanity_check_add (key, checker) | Add a checker before to constraint value before writing it to the config table. |
Config key
tasklist_show_all | boolean |
If false it will show only in the active tag otherwise show all client.
|
|
border_color_normal | gears_color | The color of client border. | |
border_color_focus | gears_color | The color of focused client border. | |
border_color_rotation | integer | Rotation of the color pattern in degree. | |
border_width | integer | Thickness of the client border in pixel. | |
default_decoration_mode | enum | Default mode of the client decoration (SSD or CSD). | |
cursor_size | integer | The size of the cursor | |
cursor_inactive_timeout | integer | Time in miliseconds to hide the cursor (0 means never hide). | |
cursor_edge_threshold | integer | Distance in pixel from the edge of screen to trigger edge tiling for floating client. | |
cursor_edge_snapping_overlay_color | table | Overlay color when edge threshold is active. | |
repeat_rate | integer | Keyboard repeat rate in hz. | |
repeat_delay | integer | Keyboard repeat delay in miliseconds. | |
xkb_rules | string | XKB Rules. | |
xkb_model | string | XKB model. | |
xkb_layout | string | XKB layout. | |
xkb_variant | string | XKB variant. | |
xkb_options | string | XKB options. | |
useless_gaps | integer | The gap size between clients |
Static module functions
- 🔗 config.init (src) -> boolean
-
Merge source table to the config table.
Parameters:
Name Type(s) Description src string or table The configuration table to load. It can be either the path to the config file (which should return a table) or directly a table containing all the config value. Returns:
-
boolean
True if successful, false otherwise.
- 🔗 config.color_check (item) -> boolean
-
Check if item is created from gears.color.
Parameters:
Name Type(s) Description item gears_color Item to check. Returns:
-
boolean
- 🔗 config.positive (item) -> boolean
-
Check if item is a positive number.
Parameters:
Name Type(s) Description item number Item to check. Returns:
-
boolean
- 🔗 config.check_enum (item, enum_table) -> function
-
Return a function that will check if item is a part of the passed enum table.
Parameters:
Name Type(s) Description item number Item to check. enum_table table The enum table. Returns:
-
function
- 🔗 config.sanity_check_add (key, checker)
-
Add a checker before to constraint value before writing it to the config table.
If the key exist it will throw error.
Parameters:
Name Type(s) Description key string Config key to add. checker function or string Function or data type as a tester.
Config key
- 🔗 tasklist_show_all boolean
-
If
false
it will show only in the active tag otherwise show all client.Constraints:
Default value : true
- 🔗 border_color_normal gears_color
-
The color of client border.
Constraints:
Default value : #888888
See also:
gears.color This module simplifies the creation of cairo pattern objects. module - 🔗 border_color_focus gears_color
-
The color of focused client border.
Constraints:
Default value : #888888
See also:
gears.color This module simplifies the creation of cairo pattern objects. module - 🔗 border_color_rotation integer
-
Rotation of the color pattern in degree.
Constraints:
Default value : 0
- 🔗 border_width integer
-
Thickness of the client border in pixel.
Constraints:
Default value : 0
- 🔗 default_decoration_mode enum
-
Default mode of the client decoration (SSD or CSD).
Constraints:
Default value : SERVER_SIDE
See also:
cuteful.enum.decoration_mode toplevel decoration mode enum extracted from cwc toplevel.h
. (cuteful.enum)tables - 🔗 cursor_size integer
-
The size of the cursor
Constraints:
Default value : 24
- 🔗 cursor_inactive_timeout integer
-
Time in miliseconds to hide the cursor (0 means never hide).
Constraints:
Default value : 5000
- 🔗 cursor_edge_threshold integer
-
Distance in pixel from the edge of screen to trigger edge tiling for floating client.
Constraints:
Default value : 16
- 🔗 cursor_edge_snapping_overlay_color table
-
Overlay color when edge threshold is active.
Constraints:
Default value : {0.1, 0.2, 0.4, 0.1} - 🔗 repeat_rate integer
-
Keyboard repeat rate in hz.
Constraints:
Default value : 30
- 🔗 repeat_delay integer
-
Keyboard repeat delay in miliseconds.
Constraints:
Default value : 400
- 🔗 xkb_rules string
-
XKB Rules.
Constraints:
Default value : ""
- 🔗 xkb_model string
-
XKB model.
Constraints:
Default value : ""
- 🔗 xkb_layout string
-
XKB layout.
Constraints:
Default value : ""
- 🔗 xkb_variant string
-
XKB variant.
Constraints:
Default value : ""
- 🔗 xkb_options string
-
XKB options.
Constraints:
Default value : ""
- 🔗 useless_gaps integer
-
The gap size between clients
Constraints:
Default value : 0