Skip to content

Instantly share code, notes, and snippets.

@cirrusUK
Created October 15, 2020 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cirrusUK/2796d4e1217226dc2e5f1589edec52ff to your computer and use it in GitHub Desktop.
Save cirrusUK/2796d4e1217226dc2e5f1589edec52ff to your computer and use it in GitHub Desktop.
#!/bin/sh
dir=("$HOME"/video)
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
mpv --script=/home/cirrus/.config/mpv/scripts/mynotify.lua --no-osd-bar --ontop --no-config --geometry=482x276+1192+370 --autofit-smaller=150x150 "${dir}/${selection}"
else
exit
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment