dots


dots / themes / conky / laptop / widgets / lib
xxwhirlpool  ·  2025-06-06

common.lua

 1local M = {}
 2
 3---extends the base config with the given overrides
 4---@param overrides table
 5function M.extend_config(overrides)
 6  local config = {
 7    -- load common funcs
 8    lua_load = './widgets/lib/funcs.lua',
 9
10    -- run settings
11    total_run_times = 0,
12    update_interval = 1,
13
14    -- positioning
15    alignment = 'bottom_left',
16    xinerama_head = tonumber(os.getenv("NOW_CLOCKING_DISPLAY") or 0),
17
18    -- draw settings
19    double_buffer = true,
20    draw_shades = false,
21    draw_blended = false,
22
23    -- compositor settings
24    own_window = true,
25    own_window_argb_visual = true,
26    own_window_argb_value = 0,
27    own_window_transparent = true,
28    own_window_type = 'desktop',
29    own_window_hints = 'undecorated,below,skip_taskbar,sticky,skip_pager',
30  }
31
32  for k, v in pairs(overrides) do
33    config[k] = v
34  end
35
36  return config
37end
38
39return M