aboutsummaryrefslogtreecommitdiff
path: root/dwm-status
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-05-10 22:57:02 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-05-10 22:57:02 +0200
commit3cd9138c9d8fb9be248c75330cca9da47f4d2e8a (patch)
treeb3b677a9c1a474589f45d20953028a987fa73b80 /dwm-status
parent83f7fe4b8402bab171d110703a1b1115efbc9b28 (diff)
downloadbin-3cd9138c9d8fb9be248c75330cca9da47f4d2e8a.tar.gz
bin-3cd9138c9d8fb9be248c75330cca9da47f4d2e8a.zip
added a whole bunch of scripts
Diffstat (limited to 'dwm-status')
-rwxr-xr-xdwm-status17
1 files changed, 11 insertions, 6 deletions
diff --git a/dwm-status b/dwm-status
index 7674482..e95dad3 100755
--- a/dwm-status
+++ b/dwm-status
@@ -1,5 +1,4 @@
#!/bin/sh
-
while true; do
datetime="$(date '+%d %a %H:%M')"
@@ -19,13 +18,19 @@ while true; do
net="offline"
fi
- # VPN (tun0 / wg0 / proton0 – adjust to match your system)
- if ip link show tun0 >/dev/null 2>&1 || ip link show wg0 >/dev/null 2>&1 || ip link show proton0 >/dev/null 2>&1; then
- vpn="VPN on"
+ # CPU usage
+ cpu="$(top -bn1 | awk '/^%Cpu/{print int($2+$4) "%"}')"
+
+ # Memory
+ mem="$(free -m | awk '/^Mem/{print $3 "M"}')"
+
+ # VPN status
+ if ip link show wg-vps >/dev/null 2>&1; then
+ vpn="VPS on"
else
- vpn="VPN off"
+ vpn="VPS off"
fi
- xsetroot -name "VOL $vol | NET $net | $vpn | $datetime "
+ xsetroot -name "$datetime | CPU $cpu | MEM $mem | VOL $vol | NET $net | $vpn "
sleep 5
done