diff --git a/conky-bottom.conf b/conky-bottom.conf index 7c50e0c..8c513e5 100644 --- a/conky-bottom.conf +++ b/conky-bottom.conf @@ -25,7 +25,8 @@ along with this program. If not, see . ]] conky.config = { - alignment = 'bottom_left', + lua_load = '~/.config/conky/functions.lua', + alignment = 'bottom_right', background = false, border_width = 1, cpu_avg_samples = 2, @@ -64,42 +65,46 @@ conky.config = { } conky.text = [[ -${color}\ -::: \ -${top pid 1}\ +${color 3a2a59}\ +--\ +${lua_parse sub_space 0 ${top pid 1}}\ :\ ${color 553D82}\ -${top name 1}\ +${lua_parse sub_space . ${top name 1}}.\ ${color 3a2a59}\ -${top mem 1}${top cpu 1} \ --- -${color}\ -::: \ -${top pid 2}\ +${lua_parse sub_space 0 ${top mem 1}}:\ +${lua_parse sub_space 0 ${top cpu 1}}\ +::: +${color 32244D}\ +--\ +${lua_parse sub_space 0 ${top pid 2}}\ :\ ${color 433066}\ -${top name 2}\ +${lua_parse sub_space . ${top name 2}}.\ ${color 32244D}\ -${top mem 2}${top cpu 1} \ +${lua_parse sub_space 0 ${top mem 2}}:\ +${lua_parse sub_space 0 ${top cpu 2}}\ -- -${color}\ -::: \ -${top pid 3}\ +${color 2B1F42}\ +--\ +${lua_parse sub_space 0 ${top pid 3}}\ :\ ${color 32244D}\ -${top name 3}\ +${lua_parse sub_space . ${top name 3}}.\ ${color 2B1F42}\ -${top mem 3}${top cpu 1} \ --- -${color}\ -::: \ -${top pid 4}\ -:\ -${color 2B1F42}\ -${top name 4}\ +${lua_parse sub_space 0 ${top mem 3}}:\ +${lua_parse sub_space 0 ${top cpu 3}}\ +::: ${color 251a38}\ -${top mem 4}${top cpu 4} \ --- +--\ +${lua_parse sub_space 0 ${top pid 4}}\ +:\ +${color 2B1F42}\ +${lua_parse sub_space . ${top name 4}}.\ +${color 251a38}\ +${lua_parse sub_space 0 ${top mem 4}}:\ +${lua_parse sub_space 0 ${top cpu 4}}\ +::: ]] -- vim: set filetype=lua: diff --git a/conky-top.conf b/conky-top.conf index e2d29e9..cebc738 100644 --- a/conky-top.conf +++ b/conky-top.conf @@ -25,6 +25,7 @@ along with this program. If not, see . ]] conky.config = { + lua_load = '~/.config/conky/functions.lua', alignment = 'top_left', background = false, border_width = 1, @@ -40,7 +41,7 @@ conky.config = { font = 'xos4 Terminus:size=12', gap_x = 6, gap_y = 117, - minimum_height = 5, + minimum_height = 5,0, minimum_width = 5, net_avg_samples = 2, double_buffer = true, @@ -65,10 +66,13 @@ conky.config = { conky.text = [[ -----::\ +${lua_parse pad - 3 ${processes}}\ $processes\ :\ +${lua_parse pad - 3 ${running_processes}}\ $running_processes\ :\ +${lua_parse pad - 3 ${cpu}}\ ${color A82283}\ $cpu\ $color\ @@ -107,14 +111,16 @@ ${fs_free /mnt/4tb_2}\ $color\ ::\ \ +${lua_parse pad - 6 ${upspeed enp3s0}}\ ${color 701461}\ -${upspeed}\ +${upspeed enp3s0}\ $color\ -\ ${color A82283}\ -${downspeed}\ +${downspeed enp3s0}\ $color\ ---\ +${lua_parse pad - 6 ${downspeed enp3s0}}\ +-\ ${color 701461}\ $nodename\ $color\ @@ -141,6 +147,12 @@ $color\ ${color 701461}\ $uptime_short\ $color\ +::\ +${color 701461}\ +${hwmon temp 1}\ +$color\ +:\ +${hwmon fan 1}\ :::--- ]] diff --git a/functions.lua b/functions.lua new file mode 100644 index 0000000..ab6342e --- /dev/null +++ b/functions.lua @@ -0,0 +1,8 @@ +function conky_pad(char, length, text ) + return string.rep(char, length - string.len(conky_parse(text))) +end + +function conky_sub_space(replacement, str) + return string.gsub(conky_parse(str), ' ', replacement) +end +