nix-files/hosts/common/programs/conky/conky.conf

83 lines
2.8 KiB
Plaintext
Raw Normal View History

-- docs: <https://conky.cc/variables>
-- color names are X11 colors: <https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart>
-- - can also use #rrggbb syntax
-- example configs: <https://forum.manjaro.org/t/conky-showcase-2022/97123>
-- example configs: <https://www.reddit.com/r/Conkyporn/>
--
-- exec options:
-- `exec <cmd>` => executes the command, synchronously, renders its output as text
-- `texeci <interval_sec> <cmd>` => executes the command periodically, async (to not block render), renders as text
-- `pexec <cmd>` => executes the command, synchronously, parses its output
2023-07-12 23:57:01 +00:00
conky.config = {
2023-12-28 17:07:29 +00:00
out_to_wayland = true,
update_interval = 10,
2023-12-28 17:07:29 +00:00
alignment = 'middle_middle',
own_window_type = 'desktop',
-- own_window_argb_value: opacity of the background (0-255)
own_window_argb_value = 0,
-- own_window_argb_value = 92,
-- own_window_colour = '#beebe5', -- beebe5 matches nixos flake bg color
2023-12-28 17:07:29 +00:00
-- "border" pads the entire conky window
-- this can be used to control the extent of the own_window background
border_inner_margin = 8,
-- optionally, actually draw borders
-- draw_borders = true,
2023-12-28 17:07:29 +00:00
-- shades are drop-shadows, outline is the centered version. both apply to text only
draw_shades = true,
draw_outline = false,
default_shade_color = '#beebe5',
default_outline_color = '#beebe5',
2023-12-28 17:07:29 +00:00
font = 'sans-serif:size=8',
use_xft = true,
2023-12-28 17:07:29 +00:00
default_color = '#ffffff',
color1 = '000000',
color2 = '404040',
}
vars = {
-- kBps = 'K/s',
kBps = 'ᴷᐟˢ',
-- percent = '%',
-- percent = '﹪',
percent = '٪',
-- percent = '⁒',
-- percent = '',
icon_suffix = nil,
hour_suffix = nil,
minute_suffix = '${font sans-serif:size=14}${color2}⧗',
2023-07-12 23:57:01 +00:00
}
bat_args = ""
2023-12-28 17:07:29 +00:00
if vars.icon_suffix ~= nil then
bat_args = bat_args .. " --icon-suffix '" .. vars.icon_suffix .. "'"
end
2023-12-28 17:07:29 +00:00
if vars.hour_suffix ~= nil then
bat_args = bat_args .. " --hour-suffix '" .. vars.hour_suffix .. "'"
end
2023-12-28 17:07:29 +00:00
if vars.minute_suffix ~= nil then
bat_args = bat_args .. " --minute-suffix '" .. vars.minute_suffix .. "'"
end
if vars.percent ~= nil then
bat_args = bat_args .. " --percent-suffix '" .. vars.percent .. "'"
end
-- N.B.: `[[ <text> ]]` is Lua's multiline string literal
2023-07-12 23:57:01 +00:00
conky.text = [[
2023-09-16 14:59:12 +00:00
${color1}${shadecolor 707070}${font sans-serif:size=50:style=Bold}${alignc}${exec date +"%H:%M"}${font}
${color2}${shadecolor a4d7d0}${font sans-serif:size=20}${alignc}${exec date +"%a %d %b"}${font}
2023-07-12 23:57:01 +00:00
${color1}${shadecolor}${font sans-serif:size=22:style=Bold}${alignc}${execp @bat@ ]] .. bat_args .. [[ }${font}
2023-09-16 14:59:12 +00:00
${color1}${shadecolor}${font sans-serif:size=20:style=Bold}${alignc}${texeci 600 @weather@ }${font}
2023-07-13 02:00:15 +00:00
2023-12-28 17:07:29 +00:00
${color2}${shadecolor a4d7d0}${font sans-serif:size=16}${alignc}⇅ ${downspeedf wlan0}]] .. vars.kBps .. [[${font}
${font sans-serif:size=16}${alignc}☵ $memperc]] .. vars.percent .. [[  $cpu]] .. vars.percent .. [[${font}
2023-07-12 23:57:01 +00:00
]]