New backup 2025-03-05 23:30:03
This commit is contained in:
parent
6babf690f8
commit
6a4feb7f46
1 changed files with 8 additions and 6 deletions
|
@ -1,16 +1,18 @@
|
||||||
(defvar reveal_battery false)
|
(defvar reveal_battery false)
|
||||||
(defwidget battery []
|
(defwidget battery []
|
||||||
(revealer-on-hover
|
(revealer-on-hover
|
||||||
|
:class {(EWW_BATTERY != "")? "active" : ""}
|
||||||
:revealvar reveal_battery
|
:revealvar reveal_battery
|
||||||
:revealvar-name "reveal_battery"
|
:revealvar-name "reveal_battery"
|
||||||
(button :onclick 'notify-send battery lol'
|
(button :onclick 'notify-send battery lol'
|
||||||
"${jq(EWW_BATTERY,'.total_avg')}")
|
; {jq(EWW_BATTERY,'.[].status?')})
|
||||||
; {(EWW_BATTERY.BAT0.status == "Charging") ? " ${EWW_BATTERY.BAT0.capacity}%" : " ${EWW_BATTERY.BAT0.capacity}%"})
|
; "${jq(EWW_BATTERY,'.total_avg')}")
|
||||||
|
{(jq(EWW_BATTERY,'.[].status?') == '"Charging"') ? " ${jq(EWW_BATTERY,'.[].capacity?')}%" : " ${jq(EWW_BATTERY,'.[].capacity?')}%"})
|
||||||
(battery_children)))
|
(battery_children)))
|
||||||
|
|
||||||
(defpoll battery_level :initial 0
|
;(defpoll battery_level :initial 0
|
||||||
:interval "1s"
|
; :interval "1s"
|
||||||
"scripts/battery-status")
|
; "scripts/battery-status")
|
||||||
(defwidget battery_children []
|
(defwidget battery_children []
|
||||||
(box :class "reveal_children"
|
(box :class "reveal_children"
|
||||||
:orientation "h"
|
:orientation "h"
|
||||||
|
@ -19,5 +21,5 @@
|
||||||
(progress
|
(progress
|
||||||
:height 10
|
:height 10
|
||||||
:valign "center"
|
:valign "center"
|
||||||
:value {jq(EWW_BATTERY,'.total_avg')}
|
:value {jq(EWW_BATTERY,'.[].capacity?')}
|
||||||
:orientation "h")))
|
:orientation "h")))
|
||||||
|
|
Loading…
Add table
Reference in a new issue