Sfoglia il codice sorgente

~/.config/dwm: Support adding more statuses at the front

Lu Stadler 7 anni fa
parent
commit
d0e81fb88a
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      .config/dwm/status.sh

+ 2 - 2
.config/dwm/status.sh

5
# network
5
# network
6
#status="📡 $(nmcli --terse --fields STATE -c no g status)"
6
#status="📡 $(nmcli --terse --fields STATE -c no g status)"
7
network="$(nmcli --terse --colors no --fields name,type connection show --active | grep -v ':bridge$' | sed 's/:[-a-z0-9]*$//' | head -n1)"
7
network="$(nmcli --terse --colors no --fields name,type connection show --active | grep -v ':bridge$' | sed 's/:[-a-z0-9]*$//' | head -n1)"
8
status="📡 $network"
9
if [ "$network" = "" ]; then
8
if [ "$network" = "" ]; then
10
	status="⛔"
9
	status="$status⛔"
11
else
10
else
11
	status="$status📡 $network"
12
	if ping -w1 -c1 1.1.1.1 &> /dev/null; then
12
	if ping -w1 -c1 1.1.1.1 &> /dev/null; then
13
		status="$status*"
13
		status="$status*"
14
	fi
14
	fi