From: Stefan Huber Date: Tue, 27 Dec 2022 10:29:41 +0000 (+0100) Subject: conky: Update and more files X-Git-Url: https://git.sthu.org/?p=shutils.git;a=commitdiff_plain;h=e5a6e77d71096cff4b5d1f4b39b76154842af40f conky: Update and more files --- diff --git a/dotfiles/conky/batteryinfo.sh b/dotfiles/conky/batteryinfo.sh new file mode 100755 index 0000000..6dcc3a6 --- /dev/null +++ b/dotfiles/conky/batteryinfo.sh @@ -0,0 +1,59 @@ +#!/bin/dash +# +# Stefan Huber +# Display battery info for conky + + + +if [ -e /sys/devices/platform/smapi/ ] +then + for b in `find /sys/devices/platform/smapi/ -type d -name BAT?` + do + if [ `cat $b/installed` = "1" ] + then + name=${b##*/} + remcap=`cat $b/remaining_capacity` + remcapper=`cat $b/remaining_percent` + ratenow=`cat $b/power_now` + rateavg=`cat $b/power_avg` + remtime=`cat $b/remaining_running_time` + tempmilli=`cat $b/temperature` + temp=`echo "$tempmilli/1000" | bc` + + if [ "$remtime" = "not_discharging" ]; then + remtime=`cat $b/remaining_charging_time` + fi + if [ "$remtime" = "not_charging" ]; then + remtime="--" + fi + + echo "$name rate: $ratenow mW [~ $rateavg mW]" + echo "rem: $remcap mWh [$remcapper%, $remtime min]" + #echo "$name temp: $temp°C" + fi + done +else + for b in `find /proc/acpi/battery/ -type d -name BAT?` + do + if [ `grep -c -E "^present: *yes" $b/state` = "1" ] + then + name=${b##*/} + fullcap=`grep "last full capacity" $b/info | awk ' { print $4 } '` + remcap=`grep "remaining capacity" $b/state | awk ' { print $3 } '` + rate=`grep "present rate" $b/state | awk ' { print $3 } '` + + if [ $rate = "0" ]; then + remtime="--" + else + remtime=`echo "$remcap*60/$rate" | bc` + fi + + remcapper=`echo "$remcap*100/$fullcap" | bc ` + + echo "$name rate: $rate mW" + echo "$name rem.: $remcap mWh [$remcapper%, $remtime min]" + fi + done +fi + + diff --git a/dotfiles/conky/conkyrc-euklid b/dotfiles/conky/conkyrc-euklid index 9b36acb..a8da076 100644 --- a/dotfiles/conky/conkyrc-euklid +++ b/dotfiles/conky/conkyrc-euklid @@ -1,95 +1,103 @@ -alignment top_left -gap_x 0 -gap_y 35 -maximum_width 200 -#minimum_size 200 - -update_interval 2 -cpu_avg_samples 2 -net_avg_samples 2 - -# for the green bg -#default_color 563 -#color0 221 -#color1 894 -# for the blue bg -default_color bbb -color0 fff -color1 b94 -draw_shades no -use_spacer left -top_name_width 13 -default_bar_size 85 5 - -if_up_strictness address -short_units yes -no_buffers yes - -double_buffer yes -own_window yes -own_window_transparent yes -own_window_type normal -own_window_hints sticky, below, undecorated, skip_taskbar, skip_pager -own_window_colour 082140 - -use_xft yes -xftfont DejaVu Sans Mono:size=7.5 -#xftalpha 0.8 - - - -# Usr ${execi 6 who | cut -d " " -f 1 - | sort -u | wc -l} - - -TEXT -${color0}${font Arial:size=12}Gentoo Linux$font $alignr${kernel}$color -$alignr$acpitemp°C -$color${font DejaVu Sans Mono:bold:size=8}${cpu cpu1}% ${cpu cpu2}% ${cpu cpu3}% ${cpu cpu4}%$alignr$mem ($memperc%)$font -${cpugraph cpu1 20,32} ${cpugraph cpu2 20,32} ${cpugraph cpu3 20,32} ${cpugraph cpu4 20,32} $alignr${color1}${memgraph 20,32}$color - -${color0}${font DejaVu Sans:size=10}eth0: $font${if_up eth0}${addr eth0}$endif ${execi 2 ~/.conky/eth0info.sh} ${hr 3}$color ${if_up eth0} +-- vim: ts=4 sw=4 noet ai cindent syntax=lua + +conky.config = { + alignment = 'top_left', + gap_x = 10, + gap_y = 50, + maximum_width = 340, + + update_interval = 2, + cpu_avg_samples = 2, + net_avg_samples = 2, + + default_color = '444', + color0 = '000', + color1 = '222', + + draw_shades = false, + use_spacer = 'left', + top_name_width = 13, + + if_up_strictness = 'address', + short_units = true, + no_buffers = true, + + double_buffer = true, + own_window = true, + own_window_class = 'Conky', + own_window_type = 'dock', + own_window_hints = 'below,undecorated,below,skip_taskbar,sticky,skip_pager', + own_window_transparent = true, + + use_xft = true, + font = 'Hack:size=8.5', +}; + +conky.text = [[ +${color0}${font Arial:size=14}Gentoo Linux$font $alignr${kernel}$color +$time$alignr$acpitemp°C +$color${cpu cpu1}% ${cpu cpu2}% ${cpu cpu3}% ${cpu cpu4}%$alignr$mem ($memperc%)$font +${cpugraph cpu1 32,40} ${cpugraph cpu2 32,40} ${cpugraph cpu3 32,40} ${cpugraph cpu4 32,40} $alignr${color1}${memgraph 32,40}$color + +${color0}${font DejaVu Sans:size=12}eth0: $font${if_up eth0}${addr eth0}$endif ${execi 2 ~/.conky/eth0info.sh} ${hr 3}$color ${if_up eth0} ${downspeed eth0} ${upspeed eth0} $alignr${color1}Sum$color ${totaldown eth0} ${totalup eth0} -${downspeedgraph eth0 20,90} $alignr${upspeedgraph eth0 20,90} $endif +${downspeedgraph eth0 32,125} $alignr${upspeedgraph eth0 32,125}$endif -${if_up wlan0}${color0}${font DejaVu Sans:size=10}wlan0: $font${addr wlan0} ${hr 3}$color +${if_up wlan0}${color0}${font DejaVu Sans:size=12}wlan0: $font${addr wlan0} ${hr 3}$color $color${wireless_essid wlan0} $alignr${wireless_link_qual_perc wlan0}% ${wireless_bitrate wlan0} ${downspeed wlan0} ${upspeed wlan0} $alignr${color1}Sum$color ${totaldown wlan0} ${totalup wlan0} -${downspeedgraph wlan0 20,90} $alignr${upspeedgraph wlan0 20,90} +${downspeedgraph wlan0 32,125} $alignr${upspeedgraph wlan0 32,125}\ $endif\ -${if_up tun0}${color0}${font DejaVu Sans:size=10}tun0: $font${addr tun0} ${hr 3}$color +${if_up bnep0}${color0}${font DejaVu Sans:size=12}bnep0: $font${addr bnep0} ${hr 3}$color +${downspeed bnep0} ${upspeed bnep0} $alignr${color1}Sum$color ${totaldown bnep0} ${totalup bnep0} +${downspeedgraph bnep0 32,125} $alignr${upspeedgraph bnep0 32,125} + +$endif\ +${if_up wg0}${color0}${font DejaVu Sans:size=12}wg0: $font${addr wg0} ${hr 3}$color +${downspeed wg0} ${upspeed wg0} $alignr${color1}Sum$color ${totaldown wg0} ${totalup wg0} +${downspeedgraph wg0 32,125} $alignr${upspeedgraph wg0 32,125}\ + +$endif\ +${if_up tun0}${color0}${font DejaVu Sans:size=12}tun0: $font${addr tun0} ${hr 3}$color ${downspeed tun0} ${upspeed tun0} $alignr${color1}Sum$color ${totaldown tun0} ${totalup tun0} -${downspeedgraph tun0 20,90} $alignr${upspeedgraph tun0 20,90}\ +${downspeedgraph tun0 32,125} $alignr${upspeedgraph tun0 32,125}\ $endif\ -${if_up dns0}${color0}${font DejaVu Sans:size=10}dns0: $font${addr dns0} ${hr 3}$color -${downspeed dns0} ${upspeed dns0} $alignr${color1}Sum$color ${totaldown dns0} ${totalup dns0} -${downspeedgraph dns0 20,90} $alignr${upspeedgraph dns0 20,90} +${if_up tun1}${color0}${font DejaVu Sans:size=12}tun1: $font${addr tun1} ${hr 3}$color +${downspeed tun1} ${upspeed tun1} $alignr${color1}Sum$color ${totaldown tun1} ${totalup tun1} +${downspeedgraph tun1 32,125} $alignr${upspeedgraph tun1 32,125}\ $endif\ -${color0}${font DejaVu Sans:size=10}FS & Disc ${hr 3}$font$color -${color1}ssd $color${fs_used /} / ${fs_size /} $alignr${fs_bar /} -${if_mounted /media/storage}${color1}hdd $color${execi 60 ~/.conky/hddinfo.sh} $alignr${execibar 60 ~/.conky/hddbar.sh} +${if_up dns0}${color0}${font DejaVu Sans:size=12}dns0: $font${addr dns0} ${hr 3}$color +${downspeed dns0} ${upspeed dns0} $alignr${color1}Sum$color ${totaldown dns0} ${totalup dns0} +${downspeedgraph dns0 32,125} $alignr${upspeedgraph dns0 32,125} + $endif\ -${color1}all $color${diskio_read} ${diskio_write} $alignr${color1}sdb $color${diskio_read sdb} ${diskio_write sdb} -${diskiograph_read 20,42} ${diskiograph_write 20,42} $alignr${diskiograph_read sdb 20,42} ${diskiograph_write sdb 20,42} +${color0}${font DejaVu Sans:size=12}FS & Disc ${hr 3}$font$color +${color1}ssd $color${fs_used /} / ${fs_size /} $alignr${fs_bar 10,100 /} ${execi 5 ~/.conky/showmounts.sh}\ -${color0}${font DejaVu Sans:size=10}Top$font [$uptime_short, $processes] ${hr 3}$color -${top name 1} ${top pid 1}${top cpu 1} ${top mem_res 1} -${top name 2} ${top pid 2}${top cpu 2} ${top mem_res 2} -${top name 3} ${top pid 3}${top cpu 3} ${top mem_res 3} -${top name 4} ${top pid 4}${top cpu 4} ${top mem_res 4} -${color1}By Mem$color -${top_mem name 1} ${top_mem pid 1}${top_mem cpu 1} ${top_mem mem_res 1} -${top_mem name 2} ${top_mem pid 2}${top_mem cpu 2} ${top_mem mem_res 2} -${top_mem name 3} ${top_mem pid 3}${top_mem cpu 3} ${top_mem mem_res 3} -${color1}By IO rd wr$color -${top_io name 1} ${top_io pid 1} ${top_io io_read 1} ${top_io io_write 1} -${top_io name 2} ${top_io pid 2} ${top_io io_read 2} ${top_io io_write 2} -${top_io name 3} ${top_io pid 3} ${top_io io_read 3} ${top_io io_write 3} - -${color0}${font DejaVu Sans:size=10}Battery ${hr 3}$font$color -$color${smapi bat 0 remaining_capacity} mWh (${smapi_bat_perc 0}%) $alignr${smapi_bat_bar 0} - ${smapi bat 0 power_now} mW [${smapi bat 0 power_avg}, ${smapi bat 0 remaining_running_time} min] -#${color1}${execi 6 ~/.conky/tempinfo.sh}$color +${color1}all $color${diskio_read} ${diskio_write} $alignr${color1}sda $color${diskio_read sda} ${diskio_write sda} +${diskiograph_read 32,55} ${diskiograph_write 32,55} $alignr${diskiograph_read sda 32,55} ${diskiograph_write sda 32,55} + +${color0}${font DejaVu Sans:size=12}Top$font [$uptime_short, $processes] ${hr 3}$color + ${top name 1} ${top pid 1}${top cpu 1} ${top mem_res 1} + ${top name 2} ${top pid 2}${top cpu 2} ${top mem_res 2} + ${top name 3} ${top pid 3}${top cpu 3} ${top mem_res 3} + ${top name 4} ${top pid 4}${top cpu 4} ${top mem_res 4} +${color1}Mem:$color + ${top_mem name 1} ${top_mem pid 1}${top_mem cpu 1} ${top_mem mem_res 1} + ${top_mem name 2} ${top_mem pid 2}${top_mem cpu 2} ${top_mem mem_res 2} + ${top_mem name 3} ${top_mem pid 3}${top_mem cpu 3} ${top_mem mem_res 3} +${color1}IO: rd wr$color + ${top_io name 1} ${top_io pid 1} ${top_io io_read 1} ${top_io io_write 1} + ${top_io name 2} ${top_io pid 2} ${top_io io_read 2} ${top_io io_write 2} + ${top_io name 3} ${top_io pid 3} ${top_io io_read 3} ${top_io io_write 3} + +${execi 10 ~/.conky/showmails.sh} +${color0}${font DejaVu Sans:size=12}Battery ${hr 3}$font$color +${execi 3 upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep energy-rate: | awk '{ printf "%4.1f %s", $2, $3}'} | ${execi 600 upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep energy-full: | sed 's/^.*: *\(.*\)$/\1/g'}$alignr${battery_percent BAT0}% ${battery_bar 10,100 BAT0} +${execi 3 upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep energy-rate: | awk '{ printf "%4.1f %s", $2, $3}'} | ${execi 600 upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep energy-full: | sed 's/^.*: *\(.*\)$/\1/g'}$alignr${battery_percent BAT1}% ${battery_bar 10,100 BAT1} +${execi 5 upower -i /org/freedesktop/UPower/devices/DisplayDevice | grep 'time to empty:' | awk '{ print $4 " " $5}'}${execi 5 upower -i /org/freedesktop/UPower/devices/DisplayDevice | grep 'time to full:' | awk '{ print $4 " " $5}'}$alignr${execi 5 upower -i /org/freedesktop/UPower/devices/DisplayDevice | grep percentage: | awk '{ printf "%4.1f", $2}'}% ${execibar 10 10,100 upower -i /org/freedesktop/UPower/devices/DisplayDevice | grep percentage: | awk '{ print $2}'} +]]; diff --git a/dotfiles/conky/dmesg.conkyrc b/dotfiles/conky/dmesg.conkyrc new file mode 100644 index 0000000..5e48e97 --- /dev/null +++ b/dotfiles/conky/dmesg.conkyrc @@ -0,0 +1,37 @@ +-- vim: ts=4 sw=4 noet ai cindent syntax=lua + +conky.config = { + alignment = 'bottom_left', + gap_y = 0, + maximum_width = 1600, + + update_interval = 2, + cpu_avg_samples = 2, + net_avg_samples = 2, + + default_color = '444', + color0 = '000', + color1 = '222', + + draw_shades = false, + use_spacer = 'left', + top_name_width = 13, + + if_up_strictness = 'address', + short_units = true, + no_buffers = true, + + double_buffer = true, + own_window = true, + own_window_class = 'Conky', + own_window_type = 'dock', + own_window_hints = 'below,undecorated,below,skip_taskbar,sticky,skip_pager', + own_window_transparent = true, + + use_xft = true, + font = 'Hack:size=8.5', +}; + +conky.text = [[ +${color1}${execi 2 tail -n 14 /tmp/messages}$color +]] diff --git a/dotfiles/conky/eth0info.sh b/dotfiles/conky/eth0info.sh new file mode 100755 index 0000000..1d2db9b --- /dev/null +++ b/dotfiles/conky/eth0info.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if ip link show dev eth0 | grep -q UP ; then + operstate=$(cat /sys/class/net/eth0/operstate | tr -d '\n') + echo -n "[" + if [ "${operstate}" = "up" ]; then + #duplex=$(cat /sys/class/net/eth0/duplex | tr -d '\n') + speed=$(cat /sys/class/net/eth0/speed | tr -d '\n') + echo -n "${speed} Mbit" + else + echo -n "${operstate}" + fi + echo -n "]" +else + echo -n "[power down]" +fi diff --git a/dotfiles/conky/hddbar.sh b/dotfiles/conky/hddbar.sh new file mode 100755 index 0000000..1bcc391 --- /dev/null +++ b/dotfiles/conky/hddbar.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +df -h | grep /media/storage | awk ' { print $5 } ' diff --git a/dotfiles/conky/hddinfo.sh b/dotfiles/conky/hddinfo.sh new file mode 100755 index 0000000..de6198b --- /dev/null +++ b/dotfiles/conky/hddinfo.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +df -h | grep -m 1 /media/storage | awk ' { print $3 " / " $2 } ' diff --git a/dotfiles/conky/journald.conkyrc b/dotfiles/conky/journald.conkyrc new file mode 100644 index 0000000..5b6d01d --- /dev/null +++ b/dotfiles/conky/journald.conkyrc @@ -0,0 +1,37 @@ +-- vim: ts=4 sw=4 noet ai cindent syntax=lua + +conky.config = { + alignment = 'bottom_left', + gap_y = 0, + maximum_width = 1600, + + update_interval = 2, + cpu_avg_samples = 2, + net_avg_samples = 2, + + default_color = '444', + color0 = '000', + color1 = '222', + + draw_shades = false, + use_spacer = 'left', + top_name_width = 13, + + if_up_strictness = 'address', + short_units = true, + no_buffers = true, + + double_buffer = true, + own_window = true, + own_window_class = 'Conky', + own_window_type = 'dock', + own_window_hints = 'below,undecorated,below,skip_taskbar,sticky,skip_pager', + own_window_transparent = true, + + use_xft = true, + font = 'Hack:size=8.5', +}; + +conky.text = [[ +${color1}${execi 2 journalctl -n 14 --no-hostname -q}$color +]] diff --git a/dotfiles/conky/showmails.sh b/dotfiles/conky/showmails.sh new file mode 100755 index 0000000..a530787 --- /dev/null +++ b/dotfiles/conky/showmails.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +for f in `find $HOME/.smailq/data -name "*.eml"`; do + to=`grep To: $f | tail -c +5 | head -c 15` + subj=`grep Subject: $f | tail -c +10` + echo "$to: $subj" +done diff --git a/dotfiles/conky/showmounts.sh b/dotfiles/conky/showmounts.sh index 9365886..ecd3ae5 100755 --- a/dotfiles/conky/showmounts.sh +++ b/dotfiles/conky/showmounts.sh @@ -1,3 +1,5 @@ #!/bin/sh -df -h | grep '/dev/s[rd][c-z0-9]' | awk '{ print $1 "\t" $5 " " $6}' | sed "s_/dev/__" | sort -df -h | grep '/dev/mmc*' | awk '{ print $1 "\t" $5 " " $6}' | sed "s_/dev/__" | sort + +for path in '/dev/s[rd][b-z0-9]' '/dev/mmc' '/dev/mapper/_' '//192' '/media/nas' '/media/fhs' '$HOME/.mount'; do + df -h 2>/dev/null | grep "$path" | awk '{ printf "%-25.25s %4s %4s\n", substr($6, length($6)-24), $4, $5 }' +done diff --git a/dotfiles/conky/sysmon-awesome.conkyrc b/dotfiles/conky/sysmon-awesome.conkyrc new file mode 100644 index 0000000..5edd3ca --- /dev/null +++ b/dotfiles/conky/sysmon-awesome.conkyrc @@ -0,0 +1,106 @@ +-- vim: ts=4 sw=4 noet ai cindent syntax=lua + +conky.config = { + alignment = 'top_left', + gap_x = 10, + gap_y = 50, + maximum_width = 340, + + update_interval = 2, + cpu_avg_samples = 2, + net_avg_samples = 2, + + default_color = 'c0c0c0', + color0 = 'b21818', + color1 = 'ffffff', + + draw_shades = false, + use_spacer = 'left', + top_name_width = 13, + + if_up_strictness = 'address', + short_units = true, + no_buffers = true, + + double_buffer = true, + own_window = true, + --own_window_colour = 'f8ecc7', + own_window_class = 'Conky', + own_window_type = 'desktop', + own_window_hints = 'below,undecorated,below,skip_taskbar,sticky,skip_pager', + --own_window_transparent = true, + own_window_argb_visual = true, + own_window_argb_value = 30, + + use_xft = true, + font = 'Hack:size=8.5', +}; + +conky.text = [[ +${color0}${font Arial:size=14}Gentoo Linux$font $alignr${kernel}$color +$time$alignr$acpitemp°C +$color${cpu cpu1}% ${cpu cpu2}% ${cpu cpu3}% ${cpu cpu4}%$alignr$mem ($memperc%)$font +${cpugraph cpu1 32,40} ${cpugraph cpu2 32,40} ${cpugraph cpu3 32,40} ${cpugraph cpu4 32,40} $alignr${color1}${memgraph 32,40}$color + +${color0}${font DejaVu Sans:size=12}eth0: $font${if_up eth0}${addr eth0}$endif ${execi 2 ~/.conky/eth0info.sh} ${hr 3}$color ${if_up eth0} +${downspeed eth0} ${upspeed eth0} $alignr${color1}Sum$color ${totaldown eth0} ${totalup eth0} +${downspeedgraph eth0 32,125} $alignr${upspeedgraph eth0 32,125}$endif + +${if_up wlan0}${color0}${font DejaVu Sans:size=12}wlan0: $font${addr wlan0} ${hr 3}$color +$color${wireless_essid wlan0} $alignr${wireless_link_qual_perc wlan0}% ${wireless_bitrate wlan0} +${downspeed wlan0} ${upspeed wlan0} $alignr${color1}Sum$color ${totaldown wlan0} ${totalup wlan0} +${downspeedgraph wlan0 32,125} $alignr${upspeedgraph wlan0 32,125}\ + +$endif\ +${if_up bnep0}${color0}${font DejaVu Sans:size=12}bnep0: $font${addr bnep0} ${hr 3}$color +${downspeed bnep0} ${upspeed bnep0} $alignr${color1}Sum$color ${totaldown bnep0} ${totalup bnep0} +${downspeedgraph bnep0 32,125} $alignr${upspeedgraph bnep0 32,125} + +$endif\ +${if_up wg0}${color0}${font DejaVu Sans:size=12}wg0: $font${addr wg0} ${hr 3}$color +${downspeed wg0} ${upspeed wg0} $alignr${color1}Sum$color ${totaldown wg0} ${totalup wg0} +${downspeedgraph wg0 32,125} $alignr${upspeedgraph wg0 32,125}\ + +$endif\ +${if_up tun0}${color0}${font DejaVu Sans:size=12}tun0: $font${addr tun0} ${hr 3}$color +${downspeed tun0} ${upspeed tun0} $alignr${color1}Sum$color ${totaldown tun0} ${totalup tun0} +${downspeedgraph tun0 32,125} $alignr${upspeedgraph tun0 32,125}\ + +$endif\ +${if_up tun1}${color0}${font DejaVu Sans:size=12}tun1: $font${addr tun1} ${hr 3}$color +${downspeed tun1} ${upspeed tun1} $alignr${color1}Sum$color ${totaldown tun1} ${totalup tun1} +${downspeedgraph tun1 32,125} $alignr${upspeedgraph tun1 32,125}\ + +$endif\ +${if_up dns0}${color0}${font DejaVu Sans:size=12}dns0: $font${addr dns0} ${hr 3}$color +${downspeed dns0} ${upspeed dns0} $alignr${color1}Sum$color ${totaldown dns0} ${totalup dns0} +${downspeedgraph dns0 32,125} $alignr${upspeedgraph dns0 32,125} + +$endif\ +${color0}${font DejaVu Sans:size=12}FS & Disc ${hr 3}$font$color +${color1}ssd $color${fs_used /} / ${fs_size /} $alignr${fs_bar 10,100 /} +${execi 5 ~/.conky/showmounts.sh}\ + +${color1}all $color${diskio_read} ${diskio_write} $alignr${color1}sda $color${diskio_read sda} ${diskio_write sda} +${diskiograph_read 32,55} ${diskiograph_write 32,55} $alignr${diskiograph_read sda 32,55} ${diskiograph_write sda 32,55} + +${color0}${font DejaVu Sans:size=12}Top$font [$uptime_short, $processes] ${hr 3}$color + ${top name 1} ${top pid 1}${top cpu 1} ${top mem_res 1} + ${top name 2} ${top pid 2}${top cpu 2} ${top mem_res 2} + ${top name 3} ${top pid 3}${top cpu 3} ${top mem_res 3} + ${top name 4} ${top pid 4}${top cpu 4} ${top mem_res 4} +${color1}Mem:$color + ${top_mem name 1} ${top_mem pid 1}${top_mem cpu 1} ${top_mem mem_res 1} + ${top_mem name 2} ${top_mem pid 2}${top_mem cpu 2} ${top_mem mem_res 2} + ${top_mem name 3} ${top_mem pid 3}${top_mem cpu 3} ${top_mem mem_res 3} +${color1}IO: rd wr$color + ${top_io name 1} ${top_io pid 1} ${top_io io_read 1} ${top_io io_write 1} + ${top_io name 2} ${top_io pid 2} ${top_io io_read 2} ${top_io io_write 2} + ${top_io name 3} ${top_io pid 3} ${top_io io_read 3} ${top_io io_write 3} + +${execi 10 ~/.conky/showmails.sh} +${color0}${font DejaVu Sans:size=12}Battery ${hr 3}$font$color +${execi 3 upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep energy-rate: | awk '{ printf "%4.1f %s", $2, $3}'} | ${execi 600 upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep energy-full: | sed 's/^.*: *\(.*\)$/\1/g'}$alignr${battery_percent BAT0}% ${battery_bar 10,100 BAT0} +${execi 3 upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep energy-rate: | awk '{ printf "%4.1f %s", $2, $3}'} | ${execi 600 upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep energy-full: | sed 's/^.*: *\(.*\)$/\1/g'}$alignr${battery_percent BAT1}% ${battery_bar 10,100 BAT1} +${execi 5 upower -i /org/freedesktop/UPower/devices/DisplayDevice | grep 'time to empty:' | awk '{ print $4 " " $5}'}${execi 5 upower -i /org/freedesktop/UPower/devices/DisplayDevice | grep 'time to full:' | awk '{ print $4 " " $5}'}$alignr${execi 5 upower -i /org/freedesktop/UPower/devices/DisplayDevice | grep percentage: | awk '{ printf "%4.1f", $2}'}% ${execibar 10 10,100 upower -i /org/freedesktop/UPower/devices/DisplayDevice | grep percentage: | awk '{ print $2}'} +]]; diff --git a/dotfiles/conky/tempinfo.sh b/dotfiles/conky/tempinfo.sh new file mode 100755 index 0000000..5c94afb --- /dev/null +++ b/dotfiles/conky/tempinfo.sh @@ -0,0 +1,54 @@ +#!/bin/dash +# +# Stefan Huber +# Displays some temperature info + + +if [ -f /proc/acpi/ibm/thermal ] +then + info=`cat /proc/acpi/ibm/thermal | sed "s/^.*://" ` + + #1 ??, THM0, strongly reacts on heat at the cooling gills. reacts on cpu + #2 DVD: reacts on heat at the dvd drive + #3 express card: 31°C REACTS ON HEAT ON PC-CARD SLOT + #4 agp, gets active when switched to discrete graphics, reacts on load + #5 disappears when bat0 is plugged off --> ~50°C always + #6 thinkwiki thinks this is for bat1 + #7 disappears when bat0 is plugged off --> ~val of bat temp through smapi + #8 thinkwiki thinks this is for bat1 + #9 hdd: 33°C REACTS ON HEAD AT THE HARD DISC AREA + #10 igp, reacts on gtkperf + #11 heatsink? slowly reacts on heat at cooling gill. slowly reacts on cpu + + cpusocket=`echo $info | awk ' { print $1 } '` + dvd=`echo $info | awk ' { print $2 } '` + excard=`echo $info | awk ' { print $3 } '` + atigpu=`echo $info | awk ' { print $4 } '` + hdd=`echo $info | awk ' { print $9 } '` + intelgpu=`echo $info | awk ' { print $10 } '` + heatsink=`echo $info | awk ' { print $11 } '` + + #No equivalent in $info!! Reacts more directly to load than thm0. Due + #to acpi info, this is cpu. + cpu=`cat /sys/devices/virtual/thermal/thermal_zone1/temp | awk ' { print $1/1000 } '` + + echo -n "cpu:$cpu°C cpus:$cpusocket°C" + + if [ $intelgpu != "-1" ]; then + echo -n " igp:$intelgpu°C" + fi + + if [ $atigpu != "-1" ]; then + echo -n " agp:$atigpu°C" + fi + + echo "" + echo "hs:$heatsink°C ec:$excard°C hdd:$hdd°C dvd:$dvd°C" +else + cpu=`cat /sys/devices/virtual/thermal/thermal_zone0/temp | awk ' { print $1/1000 } '` + echo "cpu: $cpu°C" +fi + + + + diff --git a/dotfiles/conky/todo.conkyrc b/dotfiles/conky/todo.conkyrc new file mode 100644 index 0000000..f578e3d --- /dev/null +++ b/dotfiles/conky/todo.conkyrc @@ -0,0 +1,43 @@ +-- vim: ts=4 sw=4 noet ai cindent syntax=lua + +conky.config = { + alignment = 'top_right', + gap_x = 5, + gap_y = 50, + maximum_width = 600, + + update_interval = 2, + cpu_avg_samples = 2, + net_avg_samples = 2, + + default_color = '444', + color0 = '000', + color1 = '222', + + draw_shades = false, + use_spacer = 'left', + top_name_width = 13, + + if_up_strictness = 'address', + short_units = true, + no_buffers = true, + + double_buffer = true, + own_window = true, + own_window_colour = 'f8ecc7', + own_window_class = 'Conky', + own_window_type = 'dock', + own_window_hints = 'below,undecorated,below,skip_taskbar,sticky,skip_pager', + own_window_transparent = false, + + use_xft = true, + font = 'Hack:size=10', +}; + +conky.text = [[ +${color0}${font Arial:size=14}Private$font$color ${hr 3} +${color1}${execi 5 cat ~/.vimwiki/todos.wiki}$color + +${color0}${font Arial:size=14}FHS$font$color ${hr 3} +${color1}${execi 5 cat ~/.vimwiki/FHS/todos.wiki}$color +]]