diff options
author | LEVAI Daniel <leva@ecentrum.hu> | 2013-04-24 07:14:11 -0400 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2013-04-28 12:30:03 -0300 |
commit | dec4a7c0b052fe9181aa00af7f0ff5fa381128ec (patch) | |
tree | 7108c662fa198330834e2b10955147c3943fe79f /desktop/spectrwm/examples/wifi_link_quality.sh | |
parent | 16da631ccdfcd828c83ffeabe7eb57fd4604caf8 (diff) | |
download | slackbuilds-dec4a7c0b052fe9181aa00af7f0ff5fa381128ec.tar.gz |
desktop/spectrwm: Updated for version 2.2.0.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'desktop/spectrwm/examples/wifi_link_quality.sh')
-rw-r--r-- | desktop/spectrwm/examples/wifi_link_quality.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop/spectrwm/examples/wifi_link_quality.sh b/desktop/spectrwm/examples/wifi_link_quality.sh new file mode 100644 index 0000000000..30c189b0c3 --- /dev/null +++ b/desktop/spectrwm/examples/wifi_link_quality.sh @@ -0,0 +1,10 @@ +#!/bin/sh + + +wlan_int=wlan0 + +/sbin/ip link show dev ${wlan_int} >/dev/null 2>&1 || exit 1 +/sbin/ip link show dev ${wlan_int} 2>&1 |fgrep -q -e"state DOWN" && exit 1 + +LINK_QUALITY=$( /sbin/iwconfig "${wlan_int}" 2>&1 |fgrep -e'Link Quality' |tr -s ' ' |cut -d' ' -f3 |cut -d= -f2 ) +echo "{${LINK_QUALITY}}" |