Browse Source

~/.config/dwm: Display if network has internet access

Lu Stadler 7 years ago
parent
commit
5b85f2b12a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      .config/dwm/status.sh

+ 4 - 0
.config/dwm/status.sh

@ -8,6 +8,10 @@ network="$(nmcli --terse --colors no --fields name,type connection show --active
8 8
status="📡 $network"
9 9
if [ "$network" = "" ]; then
10 10
	status="⛔"
11
else
12
	if ping -w1 -c1 1.1.1.1 &> /dev/null; then
13
		status="$status*"
14
	fi
11 15
fi
12 16
#status="📡 $(nmcli -t -f active,ssid dev wifi | sort -r | uniq)"
13 17