Back to custom sb-battery script.
This commit is contained in:
parent
d7f736b07c
commit
417c39af19
2 changed files with 13 additions and 3 deletions
8
_desktop/_scripts/sb-network
Executable file
8
_desktop/_scripts/sb-network
Executable 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
|
|
@ -154,9 +154,11 @@ screens = [
|
||||||
update_interval=1,
|
update_interval=1,
|
||||||
cmd="sb-volume",
|
cmd="sb-volume",
|
||||||
),
|
),
|
||||||
widget.Wlan(
|
widget.GenPollCommand(
|
||||||
format='',
|
background='#770000',
|
||||||
disconnected_message="<span background='#770000' foreground='#ffffff' line_height='512'>no wifi</span>",
|
foreground='#ffffff',
|
||||||
|
update_interval=1,
|
||||||
|
cmd="sb-network",
|
||||||
),
|
),
|
||||||
widget.Battery(
|
widget.Battery(
|
||||||
format='{char} {percent:2.0%}',
|
format='{char} {percent:2.0%}',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue