6 bpm
=1048576 # 1024*1024
7 up_interfaces
=$
(ifconfig |
grep "UP,BROADCAST,RUNNING" |\
8 sed 's/://' |
awk '{print $1}')
19 OpenBSD
) up_type
=$
(ifconfig
$1 |
grep "groups" |
awk '{print $2}') ;;
24 if [[ "$up_type" == "wlan" ]]; then
27 wifi_ssid
=$
(iw dev
$1 link |
grep SSID | cut
-d " " -f 2-)
28 wifi_strength
=$
(grep "^\s*w" /proc
/net
/wireless |\
29 awk '{print int($3 * 100 / 70) "%"}')
30 ssid_strength
='\n'$wifi_ssid' '$wifi_strength;;
32 OpenBSD
) ssid_strength
=$
(echo "$int" |
grep join |\
33 awk '{print "\n"$3"\t"int((-0.0154*$8*$8)-(0.3794*$8)+98.182)"%"}');;
42 for each_interface
in $up_interfaces; do
45 # cat /sys/class/net/$each_interface/statistics/rx_bytes);;
46 # OpenBSD) total_in=$(netstat -b -I $each_interface |\
47 # egrep "[a-z0-9]{2}:" | awk '{print $5}');;
49 check_type
$each_interface
51 egress
) icon
=$other_icon ;;
52 wlan
) icon
=$wifi_icon ;;
53 eth
) icon
=$eth_icon ;;
54 *) icon
=$other_icon ;;
56 # in_sum=$(($total_in / $bpm))
57 # result+=$icon' '$in_sum' '
64 for each_interface
in $up_interfaces; do
65 int
=$
(ifconfig
$each_interface)
66 ip
=$
(echo "$int" |
grep 'inet ' |
awk '{print $2}')
67 check_type
$each_interface
68 get_ssid_strength
$each_interface
69 result
+="$up_type\t($each_interface)$ssid_strength\n$ip\n\n"
71 notify-send
"Network details" "$result"
75 ifconfig |
grep -A1 "$up_interfaces" |
grep 'inet' |
awk '{print $2}'
79 notify
) notify_status
;;