It's time to go home

This commit is contained in:
coolnsx
2023-07-24 12:04:11 +05:30
parent f9dc5f8759
commit ec0e3d17c1
16 changed files with 90 additions and 82 deletions

View File

@@ -10,7 +10,7 @@
:reserve (struts :distance "40px" :side "top")
:windowtype "dock"
:wm-ignore false
(clock))
(clock))
(defwindow time_0
:monitor 0
@@ -23,7 +23,7 @@
:reserve (struts :distance "40px" :side "top")
:windowtype "dock"
:wm-ignore false
(clock))
(clock))
(defpoll HOUR :interval "2s" `date +\"%I\"`)
(defpoll MIN :interval "2s" `date +\"%M\"`)
@@ -31,40 +31,40 @@
(defpoll DAY :interval "5s" `date +\"%A\"`)
(defwidget clock []
(box :class "genwin" :orientation "h" :spacing 50 :space-evenly false :vexpand "false" :hexpand "false"
(box :orientation "h" :spacing 0
(label :class "time_hour" :valign "start" :wrap "true" :limit-width 25 :text HOUR)
(label :class "time_min" :valign "end" :wrap "true" :limit-width 25 :text MIN))
(box :orientation "v" :spacing 0 :space-evenly true
(label :class "time_mer" :valign "start" :halign "end" :wrap "true" :limit-width 25 :text MER)
(label :class "time_day" :valign "end" :halign "end" :wrap "true" :limit-width 25 :text DAY))))
(box :class "genwin" :orientation "h" :spacing 50 :space-evenly false :vexpand "false" :hexpand "false"
(box :orientation "h" :spacing 0
(label :class "time_hour" :valign "start" :wrap "true" :limit-width 25 :text HOUR)
(label :class "time_min" :valign "end" :wrap "true" :limit-width 25 :text MIN))
(box :orientation "v" :spacing 0 :space-evenly true
(label :class "time_mer" :valign "start" :halign "end" :wrap "true" :limit-width 25 :text MER)
(label :class "time_day" :valign "end" :halign "end" :wrap "true" :limit-width 25 :text DAY))))
;; music
(defwindow music_0
:monitor 0
:geometry (geometry :x "50"
:y "50"
:width "35%"
:width "30%"
:height "40px"
:anchor "bottom left")
:stacking "bg"
:reserve (struts :distance "10px" :side "bottom")
:windowtype "dock"
:wm-ignore true
(music))
(music))
(defwindow music_1
:monitor 1
:geometry (geometry :x "50"
:y "50"
:width "35%"
:width "30%"
:height "40px"
:anchor "bottom left")
:stacking "bg"
:reserve (struts :distance "10px" :side "bottom")
:windowtype "dock"
:wm-ignore true
(music))
(music))
(defpoll SONG :interval "2s" `./script song`)
(defpoll ARTIST :interval "2s" `./script artist`)
@@ -73,18 +73,18 @@
(defpoll CURRENT :interval "1s" `./script time`)
(defwidget music []
(box :class "genwin" :orientation "h" :space-evenly "false" :vexpand "true" :hexpand "false"
(box :class "album_art" :vexpand "false" :hexpand "false" :style "background-image: url('${COVER}');")
(box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :halign "center" :class "song" :wrap "false" :limit-width 40 :text SONG)
(label :halign "center" :class "artist" :wrap "false" :text ARTIST)
(box :orientation "h" :spacing 20 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false"
(button :class "btn_prev" :onclick "./script prev" "玲")
(button :class "btn_prev" :onclick "./script seek '-1'" "")
(button :class "btn_play" :onclick "./script play_toggle" STATUS)
(button :class "btn_next" :onclick "./script seek '1'" "")
(button :class "btn_next" :onclick "./script next" "怜"))
(box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false" :space-evenly "false"
(scale :min 0 :active "true" :max 100 :value CURRENT))
)
))
(box :class "genwin" :orientation "h" :space-evenly "false" :vexpand "true" :hexpand "false"
(box :class "album_art" :vexpand "false" :hexpand "false" :style "background-image: url('${COVER}');")
(box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :halign "center" :class "song" :wrap "false" :limit-width 25 :text SONG)
(label :halign "center" :class "artist" :wrap "false" :text ARTIST)
(box :orientation "h" :spacing 20 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false"
(button :class "btn_prev" :onclick "./script prev" "玲")
(button :class "btn_prev" :onclick "./script seek '-1'" "")
(button :class "btn_play" :onclick "./script play_toggle" STATUS)
(button :class "btn_next" :onclick "./script seek '1'" "")
(button :class "btn_next" :onclick "./script next" "怜"))
(box :class "music_bar" :halign "center" :vexpand "false" :hexpand "false" :space-evenly "false"
(scale :min 0 :active "true" :max 100 :value CURRENT)))))