mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-02-03 19:48:06 +08:00
19 lines
701 B
Text
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 "")
|