mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
Actual final build before release
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user