Skip to content

Instantly share code, notes, and snippets.

View camilstaps's full-sized avatar

Camil Staps camilstaps

View GitHub Profile
@camilstaps
camilstaps / wireless.sh
Last active March 2, 2016 12:08 — forked from pimeys/wireless.sh
Wireless plugin for xmobar
#!/bin/bash
INTF=$1
iwconfig "$INTF" 2>&1 | grep -q no\ wireless\ extensions\. && {
echo wired
exit 0
}
essid=`iwconfig "$INTF" | grep 'ESSID:' | cut -d' ' -f 2- | sed 's/^ *//g' | cut -d' ' -f 4- | sed 's/ *$//g'`
essid="${essid:7:(-1)}"
quality=`iwconfig "$INTF" | grep 'Link Quality' | sed 's/^ *//g' | cut -d'=' -f2 | cut -d' ' -f1`