summaryrefslogtreecommitdiffstats
path: root/.local/bin/status
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-12-24 21:54:59 +0100
committerJoe <rbo@gmx.us>2024-12-24 21:54:59 +0100
commit4cf337b4f25b91eeb763e3ddf6b86252a0afbc9f (patch)
tree784b8b42a7fb2172414a397b72bdac37c6f87de9 /.local/bin/status
parentup (diff)
downloaddotfiles-bsd-4cf337b4f25b91eeb763e3ddf6b86252a0afbc9f.tar.gz
dotfiles-bsd-4cf337b4f25b91eeb763e3ddf6b86252a0afbc9f.tar.bz2
dotfiles-bsd-4cf337b4f25b91eeb763e3ddf6b86252a0afbc9f.tar.xz
dotfiles-bsd-4cf337b4f25b91eeb763e3ddf6b86252a0afbc9f.tar.zst
dotfiles-bsd-4cf337b4f25b91eeb763e3ddf6b86252a0afbc9f.zip
status up
Diffstat (limited to '.local/bin/status')
-rwxr-xr-x.local/bin/status/sb-battery3
-rwxr-xr-x.local/bin/status/sb-cpu2
-rwxr-xr-x.local/bin/status/sb-disk2
-rwxr-xr-x.local/bin/status/sb-memory2
-rwxr-xr-x.local/bin/status/sb-net8
5 files changed, 9 insertions, 8 deletions
diff --git a/.local/bin/status/sb-battery b/.local/bin/status/sb-battery
index ca4ff69..e4b29c6 100755
--- a/.local/bin/status/sb-battery
+++ b/.local/bin/status/sb-battery
@@ -1,9 +1,9 @@
#!/bin/sh
-echo -n "^c#fabd2f^"
case $(hostname -s) in
mother) exit ;;
po-rbo)
+ echo -n "^c#fabd2f^"
charge=$(cat /sys/class/power_supply/BAT0/capacity)
case "$(cat /sys/class/power_supply/BAT0/status)" in
"Charging"|"Not charging") printf "󱐋 " ;;
@@ -11,6 +11,7 @@ case $(hostname -s) in
esac
;;
mars)
+ echo -n "^c#fabd2f^"
charge=$(apm -l)
[ "$(apm -b)" -eq 3 ] && printf "󱐋 "
;;
diff --git a/.local/bin/status/sb-cpu b/.local/bin/status/sb-cpu
index 45def29..fe3712a 100755
--- a/.local/bin/status/sb-cpu
+++ b/.local/bin/status/sb-cpu
@@ -7,7 +7,7 @@
# ncpu=$(sysctl -n hw.ncpu | tee $ncpu_file)
# fi
-printf "^c#8ec07c^ "
+printf "^c#8ec07c^ "
# for i in $(top -P -d 2 -s 0.2 | grep '^CPU' | tail -n$ncpu | sed '{s/% idle$//;s/.*[[:blank:]]//;s/\..*//;s/^/100 - /;}' | bc); do
case $(hostname -s) in
mother|po-rbo)
diff --git a/.local/bin/status/sb-disk b/.local/bin/status/sb-disk
index 0c0f2cf..527a1d1 100755
--- a/.local/bin/status/sb-disk
+++ b/.local/bin/status/sb-disk
@@ -1,6 +1,6 @@
#!/bin/sh
-echo -n "^c#d3869b^ "
+echo -n "^c#d3869b^ "
df=$(df -h -T | grep '/$')
if echo "$df" | grep zfs >/dev/null 2>&1; then
zpool list $(echo $df | sed 's/\/.*//') | tail -n1 | awk '{print $3"/"$2}'
diff --git a/.local/bin/status/sb-memory b/.local/bin/status/sb-memory
index a8ba56f..0786b85 100755
--- a/.local/bin/status/sb-memory
+++ b/.local/bin/status/sb-memory
@@ -1,6 +1,6 @@
#!/bin/sh
-echo -n "^c#b8bb26^﬙ "
+echo -n "^c#b8bb26^ "
case $(hostname -s) in
mother|po-rbo)
free | sed -n '2p' | awk '{print int(100 - ($7 * 100 / $2))"%"}'
diff --git a/.local/bin/status/sb-net b/.local/bin/status/sb-net
index 7811800..50fdc0a 100755
--- a/.local/bin/status/sb-net
+++ b/.local/bin/status/sb-net
@@ -13,11 +13,11 @@ if echo "${ifc}" | grep -E '^zt' >/dev/null 2>&1; then
echo -n " "
fi
if echo "${ifc}" | grep -E '^tun|^vpn' >/dev/null 2>&1; then
- echo -n " "
+ echo -n "󰖂 "
fi
if ! $ping >/dev/null 2>&1; then
- echo "ﰸ "
- return
+ echo "󰲜"
+ exit
fi
-echo ""
+echo "󰲝"