dotfiles/.config/eww/dmp/eww.yuck
2025-05-28 18:33:04 +02:00

47 lines
1.4 KiB
Plaintext

(defpoll eversolo-state :interval "5s"
"~/.config/eww/scripts/get_dmp_state.sh")
(defwidget eversolo-main []
(box :class "eversolo-widget"
:orientation "horizontal"
:spacing 16
:padding 16
:halign "start"
(image :path "${eversolo-state.cover}"
:class ["cover"]
:width 230
:height 230
:content-fit "cover"
:valign "center"
:halign "center")
(box :orientation "vertical" :spacing 10 :valign "center" :halign "center" :padding 4
(label :text "Eversolo DMP-A6 Master Edition Gen 2"
:class "model-label" :halign "center")
(label :text "${eversolo-state.title}"
:class "title-label" :max-width 160 :wrap true :halign "center")
(label :text "${eversolo-state.artist}"
:class "artist-label" :max-width 160 :wrap false :halign "center")
(label :text "${eversolo-state.info}"
:class "info-label" :halign "center")
(box :orientation "horizontal" :spacing 12 :halign "center" :margin-top 6
(button :onclick "curl -s 'http://192.168.1.117:9529/ZidooMusicControl/v2/playLast'"
:class "ctrl-btn" " ")
(button :onclick "curl -s 'http://192.168.1.117:9529/ZidooMusicControl/v2/playOrPause'"
:class "ctrl-btn" "")
(button :onclick "curl -s 'http://192.168.1.117:9529/ZidooMusicControl/v2/playNext'"
:class "ctrl-btn" "")
)
)
)
)