updates to conky.lua

Signed-off-by: surtur <a_mirre@utb.cz>
This commit is contained in:
surtur 2020-03-01 02:45:58 +01:00
parent eb96063192
commit ba43a59c86
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

@ -1,7 +1,7 @@
conky.config = { conky.config = {
--background= false, --background= false,
--xftfont= 'DejaVu Sans Mono:size=9', --xftfont= 'DejaVu Sans Mono:size=9',
font= 'DejaVu Sans Mono:style=regular:size=10', font= 'DejaVu Sans Mono:style=regular:size=9.5',
--font= 'Ubuntu Mono:style=regular:size=10', --font= 'Ubuntu Mono:style=regular:size=10',
use_xft= true, use_xft= true,
xftalpha= 0.7, xftalpha= 0.7,
@ -14,8 +14,8 @@ own_window_transparent= true,
own_window_hints= 'undecorated,below,sticky,skip_taskbar,skip_pager', own_window_hints= 'undecorated,below,sticky,skip_taskbar,skip_pager',
--max_port_monitor_connections= 256, --max_port_monitor_connections= 256,
double_buffer= true, double_buffer= true,
minimum_width= 450, minimum_width= 256,
maximum_width= 500, maximum_width= 256,
--short_units= false, --short_units= false,
draw_shades= false, draw_shades= false,
draw_outline= false, draw_outline= false,
@ -42,33 +42,32 @@ out_to_x= true,
conky.text = [[ conky.text = [[
# #
${no_update kernel: ${kernel}} \ ${alignr}${no_update kernel: ${kernel}}
${alignr}load: ${alignr}$loadavg ${alignr}load: $loadavg
uptime: ${uptime}\ ${alignr}uptime: ${uptime}
${if_match ${battery_percent} <= 15}\ ${if_match ${battery_percent} <= 15}\
${color ff1a21}${alignr}${blink battery: ${battery_short} $battery_time}\ ${color ff1a21}${alignr}${blink battery: ${battery_short} $battery_time}
$else\ $else\
${color white}${alignr}battery: ${battery_short} $battery_time\ ${color white}${alignr}battery: ${battery_short}$battery_time
$endif${color white} $endif${color white}\
cpu: ${cpu}% ${freq} MHz \ ${alignr}core0: ${texeci 10 bc <<< "`cat /sys/class/thermal/thermal_zone5/temp` / 1000"}°C \
${goto 155}core 0: ${texeci 10 bc <<< "`cat /sys/class/thermal/thermal_zone0/temp` / 1000"}°C \ core1: ${texeci 10 bc <<< "`cat /sys/class/thermal/thermal_zone6/temp` / 1000"}°C\
core 1: ${texeci 10 bc <<< "`cat /sys/class/thermal/thermal_zone1/temp` / 1000"}°C \
${cpugraph cpu1 20,110} ${cpugraph cpu2 20,110 -t 9966ff 6699ff} \ ${alignr}${cpugraph cpu1 20,110} ${cpugraph cpu2 20,110 -t 9966ff 6699ff}
${cpugraph cpu3 20,110} ${alignr}${cpugraph cpu4 20,110 -t 9966ff 6699ff} ${goto 65}cpu0: ${cpu cpu1}% \
${goto 25}cpu1: ${cpu cpu1}% \ ${goto 185}cpu1: ${cpu cpu2}%
${goto 140}cpu2: ${cpu cpu2}% \ ${alignr}${cpugraph cpu3 20,110} ${cpugraph cpu4 20,110 -t 9966ff 6699ff}
${goto 255}cpu3: ${cpu cpu3}% \ ${goto 65}cpu2: ${cpu cpu3}% \
${goto 370}cpu4: ${cpu cpu4}% ${goto 185}cpu3: ${cpu cpu4}%
/ ${goto 70}${fs_used_perc /}% = ${fs_used /} / ${fs_size /} \ ${alignr}ram ${alignr}$memperc% = $mem/$memmax
${goto 260}ram ${alignr}$memperc% = $mem / $memmax ${alignr}swap ${alignr}$swapperc% = $swap/$swapmax
/home ${goto 70}${fs_used_perc /home}% = ${fs_used /home} / ${fs_size /home} \
${goto 260}swap ${alignr}$swapperc% = $swap / $swapmax
# #
${if_mounted /run/media/vis/data}data \ ${alignr}/ ${fs_used_perc /}% = ${fs_used /}/${fs_size /}
${goto 70} ${fs_used_perc /run/media/vis/data}% = \ ${alignr}/home ${fs_used_perc /home}% = ${fs_used /home}/${fs_size /home}
${fs_used /run/media/vis/data} / \ #
${if_mounted /run/media/vis/data}${alignr}data ${fs_used_perc /run/media/vis/data}% = \
${fs_used /run/media/vis/data}/\
${fs_size /run/media/vis/data} ${fs_size /run/media/vis/data}
${endif} ${endif}
# #
@ -86,53 +85,62 @@ ${endif}
#${color0}${goto 260}${top_mem name 5}${alignr}${top_mem pid 5}${top_mem mem 5} #${color0}${goto 260}${top_mem name 5}${alignr}${top_mem pid 5}${top_mem mem 5}
# #
${if_up wlp2s0}\ ${if_up wlp2s0}\
${color 009999}wlp2s0 \ ${color 009999}${alignr}wlp2s0
${goto 77}${color 6699ff}Q: ${color white}${wireless_link_qual_perc wlp2s0}% \
${goto 150}${color 00cc88} ${addr wlp2s0} \
${color 6699ff}${alignr}ap mac: ${color 9966ff}${wireless_ap wlp2s0}
${color 6699ff}gw: ${color 00cc88}${gw_ip} \
#get the external ip using opendns :(
${goto 150}${color 00cc88} ${texeci 30 dig +short myip.opendns.com @208.67.222.222} \
${color 6699ff}${alignr}mac: ${color 9966ff}${texeci 30 ifconfig wlp2s0 | grep ether | sed '{s/ *......//;s/..txque..*//}'}
${color 6699ff}channel: ${color 9966ff}${wireless_channel wlp2s0} \
${color 6699ff}freq: ${color0}${wireless_freq wlp2s0} \
${color 6699ff}mode: ${color 9966ff}${wireless_mode wlp2s0} \
${alignr}${color 6699ff}essid: ${color 9966ff}${wireless_essid wlp2s0} ${alignr}${color 6699ff}essid: ${color 9966ff}${wireless_essid wlp2s0}
${alignr}${color 6699ff}Q: ${color white}${wireless_link_qual_perc wlp2s0}% \
${color 6699ff}mode: ${color 9966ff}${wireless_mode wlp2s0}
${alignr}${color 6699ff}channel: ${color 9966ff}${wireless_channel wlp2s0} \
${color 6699ff}freq: ${color0}${wireless_freq wlp2s0}
${alignr}${color 6699ff}gw: ${color 00cc88}${texeci 30 route -n | awk '/UG/ && /wlp2s0/ { print $2 }'}
${color 6699ff}${alignr}ap mac: ${color 9966ff}${texeci 30 arp | awk '/gateway/ && /wlp2s0/ { print $3 }'}
${alignr}${color 6699ff}ip: ${color 00cc88}${addr wlp2s0}
#get the external ip using opendns :(
${alignr}${color 6699ff}pub ip: ${color 00cc88}${texeci 30 dig +short myip.opendns.com @208.67.222.222}
${color 6699ff}${alignr}mac: ${color 9966ff}${texeci 300 ifconfig wlp2s0 | awk '/ether/ && /txque/ { print $2 }'}
# #
${color white}total ${totaldown wlp2s0}\ #${color white}total ${totaldown wlp2s0}\
${goto 135}down ${downspeed wlp2s0}\ #${goto 135}down ${downspeed wlp2s0}\
${goto 225}${goto 270}up ${upspeed wlp2s0}\ #${goto 235}${goto 270}up ${upspeed wlp2s0}\
${alignr}total ${totalup wlp2s0} #${alignr}total ${totalup wlp2s0}
${downspeedgraph wlp2s0 25,225 9966ff 6699ff -l} · \ #${downspeedgraph wlp2s0 25,225 9966ff 6699ff -l} · \
${alignr}${upspeedgraph wlp2s0 25,225 9966ff 6699ff -l} #${alignr}${upspeedgraph wlp2s0 25,225 9966ff 6699ff -l}
${alignr} ${color 6699ff}up ${color 9966ff}${upspeed wlp2s0} \
${color 6699ff}total ${color 9966ff}${totalup wlp2s0}
${alignr}${upspeedgraph wlp2s0 25,225 6699ff 9966ff -l}
${alignr} ${color 6699ff}down ${color 9966ff}${downspeed wlp2s0} \
${color 6699ff}total ${color 9966ff}${totaldown wlp2s0}
${alignr}${downspeedgraph wlp2s0 25,225 6699ff 9966ff -l}
${endif}\ ${endif}\
# #
${if_up enp0s31f6}\ ${if_up enp0s31f6}\
${color 009999}enp0s31f6 \ ${alignr}${color 009999}enp0s31f6
${goto 140}${color 00cc88} ${addr enp0s31f6} \ ${alignr}${color 6699ff}dns: ${color 00cc88}${texeci 30 cat /etc/resolv.conf | grep nameserver | sed '{s/ *nameserver *//;s///}' | head -1}
${color 6699ff}${alignr}mac: ${color 9966ff}${texeci 300 ifconfig enp0s31f6 | grep ether | sed '{s/ *......//;s/..txque..*//}'} ${alignr}${color 6699ff}gw: ${color 00cc88}${texeci 30 route -n | awk '/UG/ && /enp0s31f6/ { print $2 }' | head -1}
${color 6699ff}gw: ${color 00cc88}${gw_ip} \ ${alignr}${color 6699ff}gw mac: ${color 9966ff}${texeci 30 arp | awk '/gateway/ && /enp0s31f6/ { print $3 }'}
${alignr}${color 6699ff}ip:${color 00cc88} ${addr enp0s31f6}
#get the external ip using opendns #get the external ip using opendns
${goto 140}${color 00cc88} ${texeci 15 dig +short myip.opendns.com @208.67.222.222} \ ${alignr}${color 6699ff}pub ip: ${color 00cc88}${texeci 30 dig +short myip.opendns.com @208.67.222.222}
${alignr}${color 6699ff}dns: ${color 9966ff}${texeci 30 cat /etc/resolv.conf | grep nameserver | sed '{s/ *nameserver *//;s///}' | head -1} ${color 6699ff}${alignr}mac: ${color 9966ff}${texeci 300 ifconfig enp0s31f6 | awk '/ether/ && /txque/ { print $2 }'}
${color white}total ${totaldown enp0s31f6}\ #
${goto 135}down ${downspeed enp0s31f6}\ ${alignr} ${color 6699ff}up ${color 9966ff}${upspeed enp0s31f6} \
${goto 225}${goto 270}up ${upspeed enp0s31f6}\ ${color 6699ff}total ${color 9966ff}${totalup enp0s31f6}
${alignr}total ${totalup enp0s31f6} ${alignr}${upspeedgraph enp0s31f6 25,225 6699ff 9966ff -l}
${downspeedgraph enp0s31f6 25,225 9966ff 6699ff -l} · \ ${alignr} ${color 6699ff}down ${color 9966ff}${downspeed enp0s31f6} \
${alignr}${upspeedgraph enp0s31f6 25,225 9966ff 6699ff -l} ${color 6699ff}total ${color 9966ff}${totaldown enp0s31f6}
${alignr}${downspeedgraph enp0s31f6 25,225 6699ff 9966ff -l}
${endif}\ ${endif}\
${if_gw}\ ${if_gw}\
${color}rhost ${goto 110} inbound: ${tcp_portmon 1 32767 count} outbound: ${tcp_portmon 32768 61000 count} all: ${tcp_portmon 1 65535 count} ${alignr}rport ${goto 55}inbound: ${tcp_portmon 1 32767 count} ${alignr}outbound: ${tcp_portmon 32768 61000 count}
${tcp_portmon 1 65535 rip 0}${alignr 1}${tcp_portmon 1 65535 rport 0} ${goto 50}${color}rhost ${alignr}all: ${tcp_portmon 1 65535 count} rport
${tcp_portmon 1 65535 rip 1}${alignr 1}${tcp_portmon 1 65535 rport 1} ${goto 30}${tcp_portmon 1 65535 rip 0}${alignr 1}${tcp_portmon 1 65535 rport 0}
${tcp_portmon 1 65535 rip 2}${alignr 1}${tcp_portmon 1 65535 rport 2} ${goto 30}${tcp_portmon 1 65535 rip 1}${alignr 1}${tcp_portmon 1 65535 rport 1}
${tcp_portmon 1 65535 rip 3}${alignr 1}${tcp_portmon 1 65535 rport 3} ${goto 30}${tcp_portmon 1 65535 rip 2}${alignr 1}${tcp_portmon 1 65535 rport 2}
${tcp_portmon 1 65535 rip 4}${alignr 1}${tcp_portmon 1 65535 rport 4} ${goto 30}${tcp_portmon 1 65535 rip 3}${alignr 1}${tcp_portmon 1 65535 rport 3}
${tcp_portmon 1 65535 rip 5}${alignr 1}${tcp_portmon 1 65535 rport 5} ${goto 30}${tcp_portmon 1 65535 rip 4}${alignr 1}${tcp_portmon 1 65535 rport 4}
${tcp_portmon 1 65535 rip 6}${alignr 1}${tcp_portmon 1 65535 rport 6} ${goto 30}${tcp_portmon 1 65535 rip 5}${alignr 1}${tcp_portmon 1 65535 rport 5}
${tcp_portmon 1 65535 rip 7}${alignr 1}${tcp_portmon 1 65535 rport 7} ${goto 30}${tcp_portmon 1 65535 rip 6}${alignr 1}${tcp_portmon 1 65535 rport 6}
${tcp_portmon 1 65535 rip 8}${alignr 1}${tcp_portmon 1 65535 rport 8} ${goto 30}${tcp_portmon 1 65535 rip 7}${alignr 1}${tcp_portmon 1 65535 rport 7}
${tcp_portmon 1 65535 rip 9}${alignr 1}${tcp_portmon 1 65535 rport 9} ${goto 30}${tcp_portmon 1 65535 rip 8}${alignr 1}${tcp_portmon 1 65535 rport 8}
${goto 30}${tcp_portmon 1 65535 rip 9}${alignr 1}${tcp_portmon 1 65535 rport 9}
${endif} ${endif}
]] ]]