diff options
author | Urbain Vaes <urbain@vaes.uk> | 2017-10-15 17:29:31 +0200 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2017-10-15 17:29:31 +0200 |
commit | c74365888889dacc403ec50a92180144a771bac4 (patch) | |
tree | 3492d71a99bee0d75ad04d83d38e6f4dc62483b0 /i3/.config/i3blocks/bin/wifi | |
parent | bbc8c1a4423f42ccda0594def689ba415b6de06a (diff) |
Add i3blocks config
Diffstat (limited to 'i3/.config/i3blocks/bin/wifi')
-rwxr-xr-x | i3/.config/i3blocks/bin/wifi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/i3/.config/i3blocks/bin/wifi b/i3/.config/i3blocks/bin/wifi new file mode 100755 index 0000000..2e47da2 --- /dev/null +++ b/i3/.config/i3blocks/bin/wifi @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +quality=$(lspci | grep -i Wireless | sed 's/^.*(rev \(.*\))/\1/') +ssid=$(iwconfig wlp2s0 | grep -oP '(?<=ESSID:").*(?=")') +address=$(ip addr show wlp2s0 | grep -oP -m1 "(?<=inet ).*(?=/)") + +echo "(${quality}% at ${ssid}) ${address}" |