Switch to built-in wifi widget.
This commit is contained in:
parent
70de3ccd42
commit
17eebf0e42
2 changed files with 3 additions and 20 deletions
|
@ -178,11 +178,11 @@ screens = [
|
|||
update_interval=1,
|
||||
cmd="sb-volume",
|
||||
),
|
||||
widget.GenPollCommand(
|
||||
widget.Wlan(
|
||||
background='#770000',
|
||||
foreground='#feffff',
|
||||
update_interval=1,
|
||||
cmd="sb-network",
|
||||
format='',
|
||||
disconnected_message="no wifi",
|
||||
),
|
||||
widget.GenPollCommand(
|
||||
update_interval=1,
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
for battery in /sys/class/power_supply/BAT?*; do
|
||||
# If non-first battery, print a space separator.
|
||||
[ -n "${capacity+x}" ] && printf " "
|
||||
# Sets up the status and capacity
|
||||
case "$(cat "$battery/status")" in
|
||||
"Full") status="\uf102" ;;
|
||||
"Discharging") status="\uf078" ;;
|
||||
"Charging") status="\uf077" ;;
|
||||
"Not charging") status="\uf444"; exit 0 ;;
|
||||
"Unknown") status="\uf128" ;;
|
||||
esac
|
||||
capacity=$(cat "$battery/capacity")
|
||||
# Will make a warn variable if discharging and low
|
||||
[ "$capacity" -le 20 ] && printf "<span size='140%%' background='#770000' foreground='#ffffff'>${status} ${capacity}%%</span>" || printf "${status} ${capacity}%%"
|
||||
done && exit 0
|
Loading…
Add table
Add a link
Reference in a new issue