Back to custom sb-battery script.

This commit is contained in:
Bartek Stalewski 2023-02-09 01:23:49 +01:00
parent d7f736b07c
commit 417c39af19
2 changed files with 13 additions and 3 deletions

8
_desktop/_scripts/sb-network Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
case "$(cat /sys/class/net/w*/operstate 2>/dev/null)" in
down) printf "no wifi" ;;
up)
[ -n "$(ip address show dev wlan0 | grep 'inet ')" ] || printf "no ip"
# && printf "$icon $(iwgetid -r)" \
esac

View File

@ -154,9 +154,11 @@ screens = [
update_interval=1,
cmd="sb-volume",
),
widget.Wlan(
format='',
disconnected_message="<span background='#770000' foreground='#ffffff' line_height='512'>no wifi</span>",
widget.GenPollCommand(
background='#770000',
foreground='#ffffff',
update_interval=1,
cmd="sb-network",
),
widget.Battery(
format='{char} {percent:2.0%}',