elenapan/config/eww/windows/microphone-indicator.yuck
elenapan ea10a0e5b2 eww: Set window revealer duration inside manage script only
Use window arguments to pass revealer duration to eww.
2025-04-01 17:05:31 +03:00

19 lines
701 B
Text

(defwindow microphone-indicator [revealer-duration]
:monitor 0
:geometry (geometry :x 0
; We cannot use get_env(EWW_SCALE) here
:y -4.5
:anchor "top center")
:stacking "overlay"
:exclusive false
(revealer
:transition "slidedown"
:reveal "${microphone-indicator-visible}"
:duration "${revealer-duration}"
(eventbox :cursor "hand2"
:onclick "pactl set-source-mute @DEFAULT_SOURCE@ toggle"
:onmiddleclick "${eww-scripts}/manage hide microphone-indicator &"
(box :class "microphone-indicator ${microphone}"))))
(defvar microphone-indicator-visible false)
(defvar microphone "")