diff options
author | Yaroslav <contact@yaroslavps.com> | 2020-04-03 22:51:45 +0300 |
---|---|---|
committer | Yaroslav <contact@yaroslavps.com> | 2020-04-03 22:51:45 +0300 |
commit | 709efba1697bc5e53475db1e60d01f779593d9fa (patch) | |
tree | 28da167949cb1d95c08dc8c5a29265e267bb12e2 /dotfiles/.local/bin/notistats | |
parent | 0b580d8480209f5e272ef3f847261c092880a84b (diff) | |
download | swayrice-709efba1697bc5e53475db1e60d01f779593d9fa.tar.gz swayrice-709efba1697bc5e53475db1e60d01f779593d9fa.zip |
fix stats notification script
Diffstat (limited to 'dotfiles/.local/bin/notistats')
-rwxr-xr-x | dotfiles/.local/bin/notistats | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dotfiles/.local/bin/notistats b/dotfiles/.local/bin/notistats index 76221ef..3d7c7ba 100755 --- a/dotfiles/.local/bin/notistats +++ b/dotfiles/.local/bin/notistats @@ -6,10 +6,10 @@ lscpu | grep 'CPU MHz' | awk '{print "CPU clock:\t" $3"MHz"}'; sensors | grep 'Package id 0' | sed 's/Package id 0/CPU temp/' | awk '{print $1 $2 "\t" $3}'; sensors | grep 'fan') if [ -f /sys/class/power_supply/BAT0/uevent ]; then - body=$body:$(echo print\(\'BAT0 drainage:\\t{}W\'.format\($(grep 'POWER_SUPPLY_POWER_NOW' /sys/class/power_supply/BAT0/uevent | awk -F '=' '{print $2}')/1000000\)\) | python) + body=$(printf "%s\n%s" "$body" "$(echo print\(\'BAT0 drainage:\\t{}W\'.format\($(grep 'POWER_SUPPLY_POWER_NOW' /sys/class/power_supply/BAT0/uevent | awk -F '=' '{print $2}')/1000000\)\) | python)") fi if [ -f /sys/class/power_supply/BAT1/uevent ]; then - body=$body:$(echo print\(\'BAT1 drainage:\\t{}W\'.format\($(grep 'POWER_SUPPLY_POWER_NOW' /sys/class/power_supply/BAT1/uevent | awk -F '=' '{print $2}')/1000000\)\) | python) + body=$(printf "%s\n%s" "$body" "$(echo print\(\'BAT1 drainage:\\t{}W\'.format\($(grep 'POWER_SUPPLY_POWER_NOW' /sys/class/power_supply/BAT1/uevent | awk -F '=' '{print $2}')/1000000\)\) | python)") fi notify-send "Hardware status" "$body" |