Actual final build before release

This commit is contained in:
coolnsx
2024-02-09 17:21:56 +05:30
parent b9da99d131
commit e9b41a7e21
11 changed files with 49 additions and 54 deletions

View File

@@ -76,7 +76,7 @@
(box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :tooltip "${song.name}" :halign "center" :class "song" :wrap "false" :limit-width 20 :text "${song.name}")
(label :halign "center" :class "artist" :wrap "false" :limit-width 20 :text "${song.artist}")
(box :orientation "h" :spacing 35 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false"
(box :orientation "h" :spacing 80 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false"
(button :class "btn_controls" :tooltip "History : ${song.prev}" :onclick "./script prev" "󰒮")
(button :class "btn_controls" :tooltip "Seek -1%" :onclick "./script seek '-1'" "")
(button :class "btn_play" :onclick "./script play_toggle" STATUS)

View File

@@ -5,7 +5,7 @@ case $1 in
songdata)
if [ -f "$datadir/current" ];then
out=$(printf '{ "command": ["get_property", "pause"]}\n' | socat - "$datadir/yt-music-mpvsocket" 2>/dev/null)
printf '{"name":"%s","artist":"%s","cover":"%s","next":"%s","prev":"%s"}' "$(cut -d'>' -f1 < "$datadir/current" | cut -d':' -f2- | sed 's|[^-]*$||;s|-$||;s| $||;s|^ ||')" "$(cut -d'>' -f1 < "$datadir/current" | sed 's_.* - __;s| $||')" "$datadir/default.jpg" "$(sed -n "/$(cut -d'>' -f2 < "$datadir/current" )/{n;p}" $datadir/next | cut -f1)" "$(sed -n "$(cat $datadir/counter)p" $datadir/next | cut -f1)"
printf '{"name":"%s","artist":"%s","cover":"%s","next":"%s","prev":"%s"}' "$(cut -d'>' -f1 < "$datadir/current" | cut -d':' -f2- | sed 's|[^-]*$||g;s|-$||g;s| $||g;s|^ ||g')" "$(cut -d'>' -f1 < "$datadir/current" | sed 's_.* - __;s| $||')" "$datadir/default.jpg" "$(sed -n "/$(cut -d'>' -f2 < "$datadir/current" )/{n;p}" $datadir/next | cut -f1)" "$(sed -n "$(cat $datadir/counter)p" $datadir/next | cut -f1)"
else
printf '{"name":"OFFLINE","artist":"offline","cover":"%s/.config/eww/music.png"}' "$HOME"
fi