alternative buffer thing moment

This commit is contained in:
mertoalex 2023-12-12 10:59:48 +03:00
parent 41b1a0b70a
commit d063287a30
1 changed files with 2 additions and 0 deletions

View File

@ -52,6 +52,7 @@ do radios+=("`$JQ ".icestats.source[${song}].server_name" <<< "${jsonData}" | s
urls+=("`$JQ ".icestats.source[${song}].listenurl" <<< "${jsonData}" | sed 's|^\"||g;s|\"$||g'`")
done
printf '\033[?1049h\033[0H' # start alternative buffer thing
while :
do clear
jsonData="$(curl -s "$url"/status-json.xsl)"
@ -83,6 +84,7 @@ do clear
select=$(timeout --foreground ${tout} fzf --reverse --height=~25 <<< "$(printf "$list\nq exit")"| awk '{print $1}')
[ "${select}" == "q" ] && {
kill $mpvpid 2>/dev/null
printf '\033[?1049l' # stop alternative buffer thing
exit
}
done