add movie script
This commit is contained in:
parent
793b8d720a
commit
f37b83c5fa
|
|
@ -49,8 +49,8 @@ colors() {
|
|||
done
|
||||
echo
|
||||
}
|
||||
movie() {
|
||||
filename="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | fzf)"
|
||||
filepath="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")"
|
||||
mpv "$(grep "$filename" <<< "$filepath")"
|
||||
}
|
||||
# movie() {
|
||||
# filename="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | fzf)"
|
||||
# filepath="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")"
|
||||
# mpv "$(grep "$filename" <<< "$filepath")"
|
||||
# }
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
if [ -t 0 ]; then
|
||||
filename="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | fzf)"
|
||||
else
|
||||
filename="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | dmenu -l 25)"
|
||||
fi
|
||||
|
||||
filepath="$(find ~/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")"
|
||||
mpv "$(grep "$filename" <<< "$filepath")"
|
||||
|
||||
Loading…
Reference in New Issue