forked from Shinonome/dots-hyprland
stuff
This commit is contained in:
Executable
+106
@@ -0,0 +1,106 @@
|
||||
(defwidget music []
|
||||
(eventbox
|
||||
:onhoverlost "scripts/toggle-music.sh --close &"
|
||||
(box
|
||||
:class "window window-music"
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:style "
|
||||
${music_open ? '' : 'margin-top: -233px; margin-bottom: 233px;'}
|
||||
${anim_open_music ? 'transition: 200ms cubic-bezier(0.05, 0.7, 0.1, 1);' : 'transition: 150ms cubic-bezier(0.3, 0, 0.8, 0.15);'}
|
||||
"
|
||||
(box
|
||||
:class "window-titlebar-music"
|
||||
(label :class "window-text" :xalign 0 :text "MUSIC")
|
||||
)
|
||||
(overlay
|
||||
(box ; Fallback
|
||||
:class "music-cover-art"
|
||||
:style "min-height: 166px;"
|
||||
)
|
||||
(box ; Cover art
|
||||
:class "music-cover-art"
|
||||
:style "background-image: url('${mcover.image}');"
|
||||
)
|
||||
(box ;
|
||||
:orientation "v"
|
||||
:class "music-box"
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "music-title"
|
||||
:wrap false
|
||||
:text "${music.title == '' ? 'Not playing' : music.title}"
|
||||
:style "color: ${mcover.color.colors.color4};"
|
||||
:limit-width 35
|
||||
)
|
||||
(label
|
||||
:class "music-artist"
|
||||
:wrap true
|
||||
:text "${music.artist}"
|
||||
:style "color: ${mcover.color.colors.color4};"
|
||||
)
|
||||
(box
|
||||
:halign "fill"
|
||||
:class "music-button-box"
|
||||
(centerbox
|
||||
:halign "center"
|
||||
(button
|
||||
:class "song-button"
|
||||
:style "color: ${mcover.color.colors.color4};"
|
||||
:onclick "playerctl previous" ""
|
||||
)
|
||||
(button
|
||||
:class "song-button"
|
||||
:style "color: ${mcover.color.colors.color4};"
|
||||
:onclick "playerctl play-pause"
|
||||
"${music.status != '' ? music.status : ''}"
|
||||
)
|
||||
(button
|
||||
:class "song-button"
|
||||
:style "color: ${mcover.color.colors.color4};"
|
||||
:onclick "playerctl next"
|
||||
""
|
||||
)
|
||||
)
|
||||
)
|
||||
(scale
|
||||
:valign "end"
|
||||
:value {music.position}
|
||||
:class "track-scale"
|
||||
:onchange "playerctl position `bc <<< \"{} * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
|
||||
:style "highlight {background-color: ${mcover.color.colors.color4};}"
|
||||
)
|
||||
)
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(box
|
||||
:class "music-media-source"
|
||||
:halign "start"
|
||||
:valign "start"
|
||||
:orientation "h"
|
||||
(label :class "music-source-icon" :text "${mcover.color.source}" :style "color: ${mcover.color.colors.color4};")
|
||||
)
|
||||
(box
|
||||
:halign "start"
|
||||
:valign "start"
|
||||
:class "music-media-source-wedge"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow music
|
||||
:wm-ignore true
|
||||
:stacking "overlay"
|
||||
:monitor 0
|
||||
:geometry (geometry
|
||||
; :x "53px"
|
||||
:y "32px"
|
||||
:width "558px"
|
||||
:height "191px"
|
||||
:anchor "top left")
|
||||
(music)
|
||||
)
|
||||
Reference in New Issue
Block a user