eww timings

This commit is contained in:
soraefir
2026-06-14 12:37:21 +02:00
parent 65b88e8c55
commit d5ea865a4e
8 changed files with 38 additions and 33 deletions

View File

@@ -69,8 +69,8 @@
; --- Quick Actions ---
(defvar power-save false)
(defvar night-light false)
(defpoll power-save :interval "5s" :initial "false" "scripts/power-save status")
(defpoll night-light :interval "5s" :initial "false" "scripts/nightlight status")
(defwidget quick-btn [icon label onclick active]
(button :class "quick-btn ${active ? 'quick-btn-active' : ''}"
@@ -85,8 +85,8 @@
(box :orientation "v" :space-evenly false :class "quick-grid" :spacing 4
(box :orientation "h" :space-evenly true
(quick-btn :icon "󰸉" :label "Wallpaper" :onclick "scripts/wallpaper" :active false)
(quick-btn :icon "󱐋" :label "Power Save" :onclick "eww update power-save=$(scripts/power-save)" :active {power-save})
(quick-btn :icon "󰌵" :label "Night Light" :onclick "eww update night-light=$(scripts/nightlight)" :active {night-light}))
(quick-btn :icon "󱐋" :label "Power Save" :onclick "scripts/power-save" :active {power-save})
(quick-btn :icon "󰌵" :label "Night Light" :onclick "scripts/nightlight" :active {night-light}))
(box :orientation "h" :space-evenly true
(quick-btn :icon "󰹑" :label "Screenshot" :onclick "scripts/screenshot" :active false)
(quick-btn :icon "󰌾" :label "Lock" :onclick "scripts/lock" :active false)