diff options
| author | krolxon <krolyxon@tutanota.com> | 2025-08-16 20:49:05 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2025-08-16 20:49:05 +0530 |
| commit | f3bdd21020b8e618433a06c1efc1cc665cb6839d (patch) | |
| tree | 32427d47c079637b670a20b62e0339df0e248641 /.local/bin/movie | |
first commit using stow
Diffstat (limited to '.local/bin/movie')
| -rwxr-xr-x | .local/bin/movie | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/bin/movie b/.local/bin/movie new file mode 100755 index 0000000..4ceb432 --- /dev/null +++ b/.local/bin/movie @@ -0,0 +1,12 @@ +#!/bin/bash + + +if [ -t 0 ]; then + filename="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | fzf)" +else + filename="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | rofi -case-smart -matching "fuzzy" -dmenu -l 25)" +fi + +filepath="$(find ~/media/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")" +mpv "$(grep "$filename" <<< "$filepath")" + |
