dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 1f248379524fcb53da8a57480909850bc34e5588
parent 54f22aab7bda7674340683d294dd50d0dc27761b
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sun, 22 Mar 2020 09:08:05 -0400

internet script more efficient

Diffstat:
M.local/bin/statusbar/internet | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/.local/bin/statusbar/internet b/.local/bin/statusbar/internet @@ -10,8 +10,7 @@ case $BLOCK_BUTTON in " ;; esac -[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡" +[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡" || + wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }') -[ ! -n "${wifiicon+var}" ] && wifiicon=$(grep "^\s*w" /proc/net/wireless | awk '{ print "📶", int($3 * 100 / 70) "%" }') - -printf "%s %s\n" "$wifiicon" "$(cat /sys/class/net/e*/operstate | sed "s/down/❎/;s/up/🌐/")" +printf "%s %s\n" "$wifiicon" "$(sed "s/down/❎/;s/up/🌐/" /sys/class/net/e*/operstate)"