summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-x.local/bin/status/sb-battery13
-rwxr-xr-x.local/bin/status/sb-temp6
-rwxr-xr-x.local/bin/status/sb-tools3
3 files changed, 15 insertions, 7 deletions
diff --git a/.local/bin/status/sb-battery b/.local/bin/status/sb-battery
index 2110062..542fda7 100755
--- a/.local/bin/status/sb-battery
+++ b/.local/bin/status/sb-battery
@@ -1,10 +1,17 @@
#!/bin/sh
-status=$(apm -b)
+case $(hostname -s) in
+ mother) return ;;
+ po-rbo) [ $(cat /sys/class/power_supply/BAT0/status) = "Charging" ] && echo -n "ﮣ " ;;
+ mars) [ $(apm -b) -eq 3 ] && echo -n "ﮣ " ;;
+esac
-[ "$status" -eq 3 ] && echo "ﮣ "
+case $(hostname -s) in
+ po-rbo) charge=$(cat /sys/class/power_supply/BAT0/capacity) ;;
+ mars) charge=$(apm -l) ;;
+esac
-case $(echo $(apm -l) / 20 | bc) in
+case $(echo $charge / 20 | bc) in
"0") printf " ";;
"1") printf " ";;
"2") printf " ";;
diff --git a/.local/bin/status/sb-temp b/.local/bin/status/sb-temp
index 1d71bb0..dc2ad35 100755
--- a/.local/bin/status/sb-temp
+++ b/.local/bin/status/sb-temp
@@ -1,3 +1,7 @@
#!/bin/sh
-echo -n "" $(sysctl -n dev.cpu.0.temperature | cut -d '.' -f1)"°C"
+case $(hostname -s) in
+ mother) ;;
+ po-rbo) cat /sys/class/hwmon/hwmon5/temp1_input | awk '{printf (" %3.1f°C", ($1 / 1000))}' ;;
+ mars) echo -n "" $(sysctl -n dev.cpu.0.temperature | cut -d '.' -f1)"°C" ;;
+esac
diff --git a/.local/bin/status/sb-tools b/.local/bin/status/sb-tools
index 78508e6..9c7484c 100755
--- a/.local/bin/status/sb-tools
+++ b/.local/bin/status/sb-tools
@@ -8,6 +8,3 @@ if pgrep gpg-agent >/dev/null 2>&1; then
else
echo -n " "
fi
-if pidof gdbus >/dev/null 2>&1; then
- echo -n "ﬗ "
-fi