eww: fix handling of no battery connected
This commit is contained in:
parent
ef6d2e2179
commit
bbb342af4d
@ -93,10 +93,11 @@
|
|||||||
(defpoll time :interval "1s" `date +'{"long":"%a %b %e %H:%M:%S %Z %Y","hour":"%H","minute":"%M"}'`)
|
(defpoll time :interval "1s" `date +'{"long":"%a %b %e %H:%M:%S %Z %Y","hour":"%H","minute":"%M"}'`)
|
||||||
|
|
||||||
; TODO: make this a package or something, not using rust-script
|
; TODO: make this a package or something, not using rust-script
|
||||||
(defpoll powerstats :interval "2s" `~/Documents/power_bat.rs`)
|
(defpoll powerstats :interval "2s" :run-while {EWW_BATTERY["BAT1"] != ""} `~/Documents/power_bat.rs`)
|
||||||
|
|
||||||
(defwidget battery []
|
(defwidget battery []
|
||||||
(box :space-evenly false
|
(box :space-evenly false
|
||||||
|
:visible {EWW_BATTERY["BAT1"] != ""}
|
||||||
:tooltip powerstats
|
:tooltip powerstats
|
||||||
(label
|
(label
|
||||||
:text {EWW_BATTERY.BAT1.status == "Charging" ? "" :
|
:text {EWW_BATTERY.BAT1.status == "Charging" ? "" :
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user