feat(eww): add mediaplayer widget, fix workspaces, window and audio widgets

This commit is contained in:
João Dias
2024-11-24 11:14:12 -03:00
parent 88af8f4a37
commit f7ae531efd
11 changed files with 115 additions and 71 deletions
+21
View File
@@ -0,0 +1,21 @@
(deflisten media :initial "{}"
`python3 ./scripts/mediaplayer.py`)
(defwidget media []
(box :class "mediaplayer"
:space-evenly false
:visible true
(label :text "${media.title} - ${media.artist}")
(button :class "previous"
:onclick "playerctl previous --player=${media.player}"
"󰒮")
(button :class "toggle play-pause"
:onclick "playerctl play-pause --player=${media.player}"
{ media.status == "playing" ? "󰏤" : "󰐊" })
(button :class "next"
:onclick "playerctl next --player=${media.player}"
"󰒭")
)
)