dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit fdc818c7a642771e1e95e12fefb13b4154951d52
parent 522413b193438b2049ab9cd660f31cde3341be2a
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue,  8 Jan 2019 14:02:48 +0100

Fix issue with multiple wlan interfaces

Diffstat:
Mlinks/.config/i3/i3scripts/i3internet | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/links/.config/i3/i3scripts/i3internet b/links/.config/i3/i3scripts/i3internet @@ -11,9 +11,9 @@ case $BLOCK_BUTTON in " ;; esac -[ "$(cat /sys/class/net/w*/operstate)" = 'down' ] && wifiicon="📡" - -if [ ! -n "${wifiicon+var}" ]; then +if [ "$(cat /sys/class/net/w*/operstate | head -n 1)" = 'down' ]; then + wifiicon="📡" +else wifiicon=$(grep "^\s*w" /proc/net/wireless | \ awk '{ print "📶", int($3 * 100 / 70) "% " }') ssid=$(nmcli connection show | grep 'wifi' | head -n 1 | awk '{print $1}')