diff options
| author | Christoph Schlosser <christoph@linux.com> | 2025-09-07 18:47:52 +0200 |
|---|---|---|
| committer | Christoph Schlosser <christoph@linux.com> | 2025-09-07 18:48:21 +0200 |
| commit | 875b3add8f4e265eeabd125472fb6d5186d3f8d5 (patch) | |
| tree | 8dba6a51a060fecec8d58e0777925698624a704e /polybar/OpenBSD-wifi.sh | |
| parent | 8e40fea5c0e42dc1204d35292e350d660ee3ed95 (diff) | |
| download | dots-875b3add8f4e265eeabd125472fb6d5186d3f8d5.tar.gz | |
polybar: Add config
Diffstat (limited to 'polybar/OpenBSD-wifi.sh')
| -rwxr-xr-x | polybar/OpenBSD-wifi.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/polybar/OpenBSD-wifi.sh b/polybar/OpenBSD-wifi.sh new file mode 100755 index 0000000..e778c92 --- /dev/null +++ b/polybar/OpenBSD-wifi.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +IF=iwx0 + +while true; do + WIFI_STATUS=$(ifconfig $IF | grep status | awk -F': ' '{print $2}') + if [[ "$WIFI_STATUS" != "active" ]]; then + echo 'Not connected' + else + WIFI_NAME=$(ifconfig iwx0 | sed -En 's/.*join (.*) chan.*/\1/p') + echo "${WIFI_NAME//\"/}" + fi + sleep 60 +done |