diff options
author | Amin Bandali <bandali@kelar.org> | 2024-06-19 09:36:15 -0400 |
---|---|---|
committer | Amin Bandali <bandali@kelar.org> | 2024-06-19 09:36:15 -0400 |
commit | a11301d3da81b87e08348e27706c53e61195dca3 (patch) | |
tree | 75831f7c7fa68f823c8b835e5ab6e4d8950d211b /.local/bin/b-bar | |
parent | 2ef9d77bbba138f45a7858f3a99c6a3c705c75e3 (diff) | |
download | configs-a11301d3da81b87e08348e27706c53e61195dca3.tar.gz configs-a11301d3da81b87e08348e27706c53e61195dca3.tar.xz configs-a11301d3da81b87e08348e27706c53e61195dca3.zip |
Various updates
Diffstat (limited to '.local/bin/b-bar')
-rwxr-xr-x | .local/bin/b-bar | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/.local/bin/b-bar b/.local/bin/b-bar index e326673..cfcd4cc 100755 --- a/.local/bin/b-bar +++ b/.local/bin/b-bar @@ -1,13 +1,28 @@ #!/bin/sh while true do - b0="/sys/class/power_supply/BAT0" - bat="$(cat $b0/capacity)" - # batl="$(cat $b0/capacity_level)" + h="$(hostname)" vols="$(b-pavols)" load="$(cat /proc/loadavg | cut -d' ' -f1)" time="$(date +'%a, %d %b %Y %R %z')" - printf "%s%% | %s | %s | %s\n" \ - "$bat" "$vols" "$load" "$time" + + case $h in + selene) + sens="$(sensors -j w83795g-i2c-*-*)" + nrbr="$(echo $sens | jq -r '.[].temp1.temp1_input')" + cpu1="$(echo $sens | jq -r '.[].temp7.temp7_input')" + cpu2="$(echo $sens | jq -r '.[].temp8.temp8_input')" + printf "%s %s %s | %s | %s | %s\n" \ + "$nrbr" "$cpu1" "$cpu2" "$vols" "$load" "$time" + ;; + *) + b0="/sys/class/power_supply/BAT0" + bat="$(cat $b0/capacity)" + # batl="$(cat $b0/capacity_level)" + printf "%s%% | %s | %s | %s\n" \ + "$bat" "$vols" "$load" "$time" + ;; + esac + sleep 5 done |