]> git.sev.monster Git - dotfiles.git/blame - bin/tint2-wifi
improved mpc-notify
[dotfiles.git] / bin / tint2-wifi
CommitLineData
1390d028 1#!/bin/sh
2base=~/.icons/Paper/24x24/panel/network
3excellent=$base-wireless-signal-excellent.svg
4 good=$base-wireless-signal-good.svg
5 ok=$base-wireless-signal-ok.svg
6 low=$base-wireless-signal-low.svg
7 none=$base-wireless-signal-none.svg
8 offline=$base-wireless-offline.svg
9while true; do
10 sleep 3
11 x=$(ifconfig wlan0 list sta)
12 if [ $? != 0 ]; then
13 echo $offline
14 continue
15 fi
16 x=$(echo "$x" | awk 'NR == 1 {next} {printf "%.0f", $5}')
17 if [ $x -ge 20 ]; then
18 echo $excellent
19 elif [ $x -ge 15 ]; then
20 echo $good
21 elif [ $x -ge 10 ]; then
22 echo $ok
23 elif [ $x -ge 5 ]; then
24 echo $low
25 else
26 echo $none
27 fi
28done
This page took 0.037022 seconds and 4 git commands to generate.