(defwidget media-player [] (box :class "media-player" :orientation "v" :height 200 :style "background-image: radial-gradient( circle farthest-side at left, rgba(0, 0, 0, 0.9) 40%, rgba(0, 0, 0, 0.2) 70%), url('${media-player_art-url}');" (box :orientation "v" (box :class "title" :halign "start" media-player_title ) (box :class "artist" :halign "start" media-player_artist ) ) (box :class "buttons" :valign "end" :orientation "h" :space-evenly true :spacing 50 (eventbox :class "previous" :width 40 :onclick "playerctl previous" "玲" ) (eventbox :class "pause" :width 40 :onclick "playerctl play-pause" ${media-player_status == "Playing" ? "" : "契"} ) (eventbox :class "next" :width 40 :onclick "playerctl next" "怜" ) ) ) ) (defwidget audio-title [] (box :class "audio-title" :valign "start" "Audio" ) ) (defwidget audio-window [] (box :class "audio" :orientation "v" :space-evenly false ; (audio-title) (media-player) ) ) (defwindow audio :monitor 2 :geometry (geometry :x "50px" :y "0px" :width "500px" :height "100%" :anchor "top left") :stacking "fg" :exclusive true (audio-window) )