ark/users/modules/eww/modules/music.yuck
2022-10-22 23:54:44 +03:00

23 lines
777 B
Plaintext

(defwidget music-module []
(eventbox
:onhover "${EWW_CMD} update music_reveal=true"
:onhoverlost "${EWW_CMD} update music_reveal=false"
(box
:class "module"
:space-evenly "false"
(box
:class "song-cover-art"
:style "background-image: url(\"${music_cover}\");")
(button
:class "module"
:onclick "${EWW_CMD} open --toggle music"
{music.title})
(revealer
:transition "slideright"
:reveal music_reveal
:duration "350ms"
(box
(button :class "song-button" :onclick "playerctl previous" "")
(button :class "song-button" :onclick "playerctl play-pause" {music.status})
(button :class "song-button" :onclick "playerctl next" ""))))))