]> git.sev.monster Git - dotfiles.git/blob - bin/tint2-wifi
actually set PINENTRY_USER_DATA, fix invocation
[dotfiles.git] / bin / tint2-wifi
1 #!/bin/sh
2 base=~/.icons/Paper-Mono-Dark/24x24/panel/network-wireless
3 excellent=$base-signal-excellent.svg
4      good=$base-signal-good.svg
5        ok=$base-signal-ok.svg
6       low=$base-signal-low.svg
7      none=$base-signal-none.svg
8  no_route=$base-no-route.svg
9   offline=$base-offline.svg
10
11 echo $base-acquiring.svg
12 while true; do
13         x=$(cat /proc/net/wireless | awk 'NR < 3 {next} {printf "%.0f", $4}')
14         if [ -z $x ]; then
15                 echo $offline
16         elif [ $x -ge -55 ]; then
17                 echo $excellent
18         elif [ $x -ge -65 ]; then
19                 echo $good
20         elif [ $x -ge -75 ]; then
21                 echo $ok
22         elif [ $x -ge -85 ]; then
23                 echo $low
24         elif [ $x -ge -90 ]; then
25                 echo $none
26         else
27                 echo $no_route
28         fi
29         sleep 2
30 done
This page took 0.046122 seconds and 4 git commands to generate.