Skip to content

Instantly share code, notes, and snippets.

@cirrusUK
Last active April 27, 2024 05:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cirrusUK/07335ec3ebd84eac996ce7d76ad311ad to your computer and use it in GitHub Desktop.
Save cirrusUK/07335ec3ebd84eac996ce7d76ad311ad to your computer and use it in GitHub Desktop.
Fuzzy find lyrics and show on scren with on screen display
#!/bin/sh
# Get song lyrics from your chosen source_dir (mp3 folder) lyrico will save lyric files in defined lyrics_dir
# DEPENDENCY : lyrico https://github.com/abhimanyuPathania/lyrico, pv : https://github.com/icetee/pv, \
# osd_cat : http://www.linuxintro.org/wiki/Osd_cat and fzf : https://github.com/junegunn/fzf
dir=(/home/cirrus/.lyrics)
get_selection() {
for p in $dir; do
ls "$p"
done \
| fzf --ansi --height 80% --color fg:-1,bg:-1,hl:4,fg+:3,bg+:233,hl+:4 --color info:150,prompt:3,spinner:150,pointer:3,marker:174,border:11 --border=sharp --prompt='➤ ' --exit-0
}
if selection=$( get_selection ); then
cat "${dir}/${selection}" | pv -qL 10 | osd_cat -A center -p middle -f '-*-pragmatapro-*-*-*-*-24-*-*-*-*-*-*-*' -cgreen -O 4 -u black
else
exit
fi
@cirrusUK
Copy link
Author

flyrics.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment