summaryrefslogtreecommitdiffstats
path: root/polybar
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-09-07 17:14:06 +0000
committerChristoph Schlosser <christoph@linux.com>2025-09-07 17:14:06 +0000
commit1c5c1b7d879d9888d617854d0cadd9a915ce3199 (patch)
tree440904510cb9ea3b2e14def75d3f89edf1d2902e /polybar
parent1d6f44dc55a5ff0fe8b6a4df44fc4d2f786534d8 (diff)
downloaddots-1c5c1b7d879d9888d617854d0cadd9a915ce3199.tar.gz
polybar: Add linux wifi script
Diffstat (limited to 'polybar')
-rwxr-xr-xpolybar/Linux-wifi.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/polybar/Linux-wifi.sh b/polybar/Linux-wifi.sh
new file mode 100755
index 0000000..90cad68
--- /dev/null
+++ b/polybar/Linux-wifi.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+while true; do
+ WIFI_STATUS=$(wpa_cli status | grep wpa_state | awk -F'=' '{print $2}')
+ if [[ "$WIFI_STATUS" == "DISCONNECTED" ]]; then
+ echo 'Not connected'
+ else
+ WIFI_NAME=$(wpa_cli status | grep ssid | awk -F'=' '{print $2}')
+ echo "$WIFI_NAME"
+ fi
+ sleep 60
+done