✨ a lot of changes and new stuff! started using mako
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
(defwidget big-media [ album_background ]
|
||||
(box :orientation "horizontal"
|
||||
:space-evenly false
|
||||
:class "big-media ${ album_background == true ? 'album-bg' : '' }"
|
||||
:style { album_background == true ? "background-image: image(url('${json_media.artUrl}'))" : "" }
|
||||
:visible { json_media.title != "null" && json_media.artist != "null" ? true : false }
|
||||
|
||||
(box :class "album-image"
|
||||
:width 98
|
||||
:height 87
|
||||
:style "background-image: image(url('${json_media.artUrl}'));"
|
||||
:valign "center")
|
||||
|
||||
(box :orientation "vertical"
|
||||
:space-evenly false
|
||||
:class "right"
|
||||
:hexpand true
|
||||
|
||||
(box :class "media-info"
|
||||
:space-evenly false
|
||||
:halign "fill"
|
||||
:orientation "vertical"
|
||||
|
||||
(label :class "title"
|
||||
:text "${json_media.title}"
|
||||
:xalign 0
|
||||
:wrap false
|
||||
:hexpand true
|
||||
:show-truncated true)
|
||||
(label :class "artist"
|
||||
:text "${json_media.artist}"
|
||||
:xalign 0
|
||||
:wrap false
|
||||
:hexpand true
|
||||
:show-truncated true)
|
||||
)
|
||||
|
||||
(box :class "controls button-row"
|
||||
:orientation "horizontal"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
|
||||
(button :class "shuffle"
|
||||
:onclick "playerctl --player=${json_media.player} shuffle Toggle"
|
||||
"")
|
||||
(button :class "previous"
|
||||
:onclick "playerctl --player=${json_media.player} previous"
|
||||
"")
|
||||
(button :class "play-pause"
|
||||
:onclick "playerctl --player=${json_media.player} play-pause"
|
||||
{ json_media.status == "playing" ? "" : "" })
|
||||
(button :class "next"
|
||||
:onclick "playerctl --player=${json_media.player} next"
|
||||
"")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user