diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-05-17 15:53:55 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-05-17 15:53:55 +0900 |
| commit | 0dc608f82f1a753c8cca8705d7efea82d6c487ea (patch) | |
| tree | bcba3663c2b5b816b3923d80c5558443fbcdcf8d /ar/.local/bin | |
| parent | 389da9127ae4b33881d0d8203d04be8074dbe614 (diff) | |
Diffstat (limited to 'ar/.local/bin')
| -rwxr-xr-x | ar/.local/bin/dmenuconnections | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ar/.local/bin/dmenuconnections b/ar/.local/bin/dmenuconnections index 13fe8cc..930ad5c 100755 --- a/ar/.local/bin/dmenuconnections +++ b/ar/.local/bin/dmenuconnections @@ -13,7 +13,8 @@ grep -q 'down' /sys/class/net/w*/operstate && wifiicon="❌" [ -z "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "🛜", int($3 * 100 / 70) "%" }') -wifi=$(printf "%s %s" "${wifiicon}" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate)") +grep -qx up /sys/class/net/e*/operstate && ethicon="🌐" || ethicon="❎" +wifi=$(printf "%s %s" "${wifiicon}" "${ethicon}") if [ -n "${wifi}" ]; then choice=$(printf 'bluetooth\nnetwork\nwifi' | dmenu -i -p "${wifi}") |
