aboutsummaryrefslogtreecommitdiff
path: root/i3blocks
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2021-04-07 20:28:41 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2021-04-07 20:28:41 +0200
commit8f70aa6798b1a3236d5ce884419446539d124e26 (patch)
tree0d703b401e7ea9870f8f89f7d66d5991b522858d /i3blocks
parent09f106fb2a7f0d585ce4828ea021db653e5d21a6 (diff)
downloadscripts-8f70aa6798b1a3236d5ce884419446539d124e26.tar.gz
scripts-8f70aa6798b1a3236d5ce884419446539d124e26.zip
Minor changes to some scripts.
Diffstat (limited to 'i3blocks')
-rwxr-xr-xi3blocks/i3internet.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/i3blocks/i3internet.sh b/i3blocks/i3internet.sh
index 3e63276..e9eb154 100755
--- a/i3blocks/i3internet.sh
+++ b/i3blocks/i3internet.sh
@@ -31,10 +31,11 @@ if [ -n "$wifiDev" ]; then
#cut -d' ' -f6)) ($(egrep "^\s*w" /proc/net/wireless |
#awk '{print int($3 * 100 / 70)"%"}'))"
# with name
+ quality="$(grep -E '^\s*w' /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}')"
+ echo "$quality" | grep -q '100' && quality='100'
wifi="$tick <span color='#79ff79'>$(nmcli |
grep -F "$wifiDev: connected to " |
- cut -d' ' -f4-) ($(grep -E '^\s*w' /proc/net/wireless |
- awk '{print int($3 * 100 / 70)"%"}'))</span>"
+ cut -d' ' -f4-) (${quality})</span>"
fi
fi