conky: fix text substitutions
This commit is contained in:
parent
4f3706622c
commit
5de06cef35
|
@ -10,55 +10,58 @@
|
||||||
-- `pexec <cmd>` => executes the command, synchronously, parses its output
|
-- `pexec <cmd>` => executes the command, synchronously, parses its output
|
||||||
|
|
||||||
conky.config = {
|
conky.config = {
|
||||||
out_to_wayland = true,
|
out_to_wayland = true,
|
||||||
update_interval = 10,
|
update_interval = 10,
|
||||||
|
|
||||||
alignment = 'middle_middle',
|
alignment = 'middle_middle',
|
||||||
own_window_type = 'desktop',
|
own_window_type = 'desktop',
|
||||||
-- own_window_argb_value: opacity of the background (0-255)
|
-- own_window_argb_value: opacity of the background (0-255)
|
||||||
own_window_argb_value = 0,
|
own_window_argb_value = 0,
|
||||||
-- own_window_argb_value = 92,
|
-- own_window_argb_value = 92,
|
||||||
-- own_window_colour = '#beebe5', -- beebe5 matches nixos flake bg color
|
-- own_window_colour = '#beebe5', -- beebe5 matches nixos flake bg color
|
||||||
|
|
||||||
-- "border" pads the entire conky window
|
-- "border" pads the entire conky window
|
||||||
-- this can be used to control the extent of the own_window background
|
-- this can be used to control the extent of the own_window background
|
||||||
border_inner_margin = 8,
|
border_inner_margin = 8,
|
||||||
-- optionally, actually draw borders
|
-- optionally, actually draw borders
|
||||||
-- draw_borders = true,
|
-- draw_borders = true,
|
||||||
|
|
||||||
-- shades are drop-shadows, outline is the centered version. both apply to text only
|
-- shades are drop-shadows, outline is the centered version. both apply to text only
|
||||||
draw_shades = true,
|
draw_shades = true,
|
||||||
draw_outline = false,
|
draw_outline = false,
|
||||||
default_shade_color = '#beebe5',
|
default_shade_color = '#beebe5',
|
||||||
default_outline_color = '#beebe5',
|
default_outline_color = '#beebe5',
|
||||||
|
|
||||||
font = 'sans-serif:size=8',
|
font = 'sans-serif:size=8',
|
||||||
use_xft = true,
|
use_xft = true,
|
||||||
|
|
||||||
default_color = '#ffffff',
|
default_color = '#ffffff',
|
||||||
color1 = '000000',
|
color1 = '000000',
|
||||||
color2 = '404040',
|
color2 = '404040',
|
||||||
-- Kbps = 'K/s',
|
}
|
||||||
Kbps = 'ᴷᐟˢ',
|
|
||||||
-- percent = '%',
|
vars = {
|
||||||
-- percent = '﹪',
|
-- kBps = 'K/s',
|
||||||
percent = '٪',
|
kBps = 'ᴷᐟˢ',
|
||||||
-- percent = '⁒',
|
-- percent = '%',
|
||||||
-- percent = '%',
|
-- percent = '﹪',
|
||||||
icon_suffix = nil,
|
percent = '٪',
|
||||||
hour_suffix = nil,
|
-- percent = '⁒',
|
||||||
minute_suffix = '${font sans-serif:size=14}${color2}⧗',
|
-- percent = '%',
|
||||||
|
icon_suffix = nil,
|
||||||
|
hour_suffix = nil,
|
||||||
|
minute_suffix = '${font sans-serif:size=14}${color2}⧗',
|
||||||
}
|
}
|
||||||
|
|
||||||
bat_args = ""
|
bat_args = ""
|
||||||
if conky.config.icon_suffix ~= nil then
|
if vars.icon_suffix ~= nil then
|
||||||
bat_args = bat_args .. " --icon-suffix '" .. conky.config.icon_suffix .. "'"
|
bat_args = bat_args .. " --icon-suffix '" .. vars.icon_suffix .. "'"
|
||||||
end
|
end
|
||||||
if conky.config.hour_suffix ~= nil then
|
if vars.hour_suffix ~= nil then
|
||||||
bat_args = bat_args .. " --hour-suffix '" .. conky.config.hour_suffix .. "'"
|
bat_args = bat_args .. " --hour-suffix '" .. vars.hour_suffix .. "'"
|
||||||
end
|
end
|
||||||
if conky.config.minute_suffix ~= nil then
|
if vars.minute_suffix ~= nil then
|
||||||
bat_args = bat_args .. " --minute-suffix '" .. conky.config.minute_suffix .. "'"
|
bat_args = bat_args .. " --minute-suffix '" .. vars.minute_suffix .. "'"
|
||||||
end
|
end
|
||||||
|
|
||||||
-- N.B.: `[[ <text> ]]` is Lua's multiline string literal
|
-- N.B.: `[[ <text> ]]` is Lua's multiline string literal
|
||||||
|
@ -71,6 +74,6 @@ ${color1}${shadecolor}${font sans-serif:size=22:style=Bold}${alignc}${execp @bat
|
||||||
${color1}${shadecolor}${font sans-serif:size=20:style=Bold}${alignc}${texeci 600 @weather@ }${font}
|
${color1}${shadecolor}${font sans-serif:size=20:style=Bold}${alignc}${texeci 600 @weather@ }${font}
|
||||||
|
|
||||||
|
|
||||||
${color2}${shadecolor a4d7d0}${font sans-serif:size=16}${alignc}⇅ ${downspeedf wlan0}${Kbps}${font}
|
${color2}${shadecolor a4d7d0}${font sans-serif:size=16}${alignc}⇅ ${downspeedf wlan0}]] .. vars.kBps .. [[${font}
|
||||||
${font sans-serif:size=16}${alignc}☵ $memperc${percent} $cpu${percent}${font}
|
${font sans-serif:size=16}${alignc}☵ $memperc]] .. vars.percent .. [[ $cpu]] .. vars.percent .. [[${font}
|
||||||
]]
|
]]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user