forked from ahurac/dotfiles
config/eww ahrc-laptop : ajout widget son
This commit is contained in:
parent
7fb809f425
commit
52edd90c6a
1 changed files with 26 additions and 2 deletions
|
@ -28,6 +28,11 @@
|
||||||
"swaync-client --subscribe"
|
"swaync-client --subscribe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(deflisten sound
|
||||||
|
:initial '{"output-volume":0,"input-volume":0,"output-muted":false}'
|
||||||
|
"listen/sound"
|
||||||
|
)
|
||||||
|
|
||||||
(defvar battery-icon '{
|
(defvar battery-icon '{
|
||||||
"unknown": "",
|
"unknown": "",
|
||||||
"critical": "",
|
"critical": "",
|
||||||
|
@ -54,6 +59,13 @@
|
||||||
"dnd": ""
|
"dnd": ""
|
||||||
}')
|
}')
|
||||||
|
|
||||||
|
(defvar sound-icon '{
|
||||||
|
"absent": "",
|
||||||
|
"moderate": "",
|
||||||
|
"loud": "",
|
||||||
|
"muted": ""
|
||||||
|
}')
|
||||||
|
|
||||||
(defwidget workspaces []
|
(defwidget workspaces []
|
||||||
(eventbox :onscroll 'action/hyprland/nearby-workspace "{}"'
|
(eventbox :onscroll 'action/hyprland/nearby-workspace "{}"'
|
||||||
(box :class "workspaces"
|
(box :class "workspaces"
|
||||||
|
@ -102,7 +114,19 @@
|
||||||
))
|
))
|
||||||
)
|
)
|
||||||
|
|
||||||
; (defwidget sound [] "")
|
(defwidget sound []
|
||||||
|
(box (eventbox
|
||||||
|
:onscroll 'action/volume "{}"'
|
||||||
|
:onclick 'pavucontrol & disown'
|
||||||
|
|
||||||
|
"${
|
||||||
|
sound.output-muted == true ? sound-icon["muted"] :
|
||||||
|
sound.output-volume < 33 ? sound-icon["absent"] :
|
||||||
|
sound.output-volume < 67 ? sound-icon["moderate"] :
|
||||||
|
sound-icon["loud"]
|
||||||
|
} ${sound.output-volume} %"
|
||||||
|
))
|
||||||
|
)
|
||||||
|
|
||||||
(defwidget network []
|
(defwidget network []
|
||||||
"${
|
"${
|
||||||
|
@ -155,7 +179,7 @@
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:class "right"
|
:class "right"
|
||||||
|
|
||||||
; (sound)
|
(sound)
|
||||||
(network)
|
(network)
|
||||||
(battery)
|
(battery)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue