diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-02-07 13:02:03 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-02-07 13:02:03 +0900 |
| commit | 8b53277b492831109a1e1a8d7d4c5753d9d48fa2 (patch) | |
| tree | 0c5c26837160f223a762aa9ef48cbff3149e6143 /ar/.local/bin/statusbar/sb-internet | |
| parent | 83487d66031d2576f7336de20f0900b7264a391b (diff) | |
modified bin/bookmarks, modified bin/dmenuconnections, modified bin/getkeys, modified bin/qndl, modified statusbar/sb-internet
Diffstat (limited to 'ar/.local/bin/statusbar/sb-internet')
| -rwxr-xr-x | ar/.local/bin/statusbar/sb-internet | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ar/.local/bin/statusbar/sb-internet b/ar/.local/bin/statusbar/sb-internet index c9180b3..df43676 100755 --- a/ar/.local/bin/statusbar/sb-internet +++ b/ar/.local/bin/statusbar/sb-internet @@ -21,14 +21,14 @@ case $BLOCK_BUTTON in esac # Wifi -if [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'up' ]; then +if grep -q 'up' /sys/class/net/w*/operstate; then wifiicon="$(awk '/^\s*w/ { print "🛜" int($3 * 100 / 70) "%" }' /proc/net/wireless)" -elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ]; then - [ "$(cat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="📡" || wifiicon="❌" +elif grep -q 'down' /sys/class/net/w*/operstate; then + grep -q '0x1003' /sys/class/net/w*/flags && wifiicon="📡" || wifiicon="❌" fi # Ethernet -[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="🌐" || ethericon="❎" +grep -q 'up' /sys/class/net/e*/operstate && ethericon="🌐" || ethericon="❎" # TUN [ -n "$(cat /sys/class/net/tun*/operstate 2>/dev/null)" ] && tunicon="🛰️" |
