From a11301d3da81b87e08348e27706c53e61195dca3 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Wed, 19 Jun 2024 09:36:15 -0400 Subject: Various updates --- .local/bin/b-bar | 25 ++++++++++++++++++++----- .local/bin/b-pavols | 2 +- 2 files changed, 21 insertions(+), 6 deletions(-) (limited to '.local/bin') 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 diff --git a/.local/bin/b-pavols b/.local/bin/b-pavols index 76606e2..051776e 100755 --- a/.local/bin/b-pavols +++ b/.local/bin/b-pavols @@ -19,5 +19,5 @@ else source_mute='-' fi -printf "%s%s,%s%s\n" \ +printf "%s%s %s%s\n" \ "$sink_volume" "$sink_mute" "$source_volume" "$source_mute" -- cgit v1.2.3-60-g2f50