浏览代码

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

Lu Stadler 7 年之前
父节点
当前提交
5b85f2b12a
共有 1 个文件被更改,包括 4 次插入0 次删除
  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