Last active
April 27, 2024 05:53
-
-
Save cirrusUK/07335ec3ebd84eac996ce7d76ad311ad to your computer and use it in GitHub Desktop.
Fuzzy find lyrics and show on scren with on screen display
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
flyrics.mp4