Krolyxon
Commit f96621a

Branches

Refs →

aurora.localbinmovie

12 lines · 437 B · Bourne Again Shell (bash)

1#!/bin/bash
2
3
4if [ -t 0 ]; then
5 filename="$(find ~/remote/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | fzf)"
6else
7 filename="$(find ~/remote/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)" -printf "%f\n" | sort | fuzzel -d -l 25)"
8fi
9
10filepath="$(find ~/remote/movies/ -type f -regex ".*\.\(mkv\|mp4\|mpeg\|avi\|mov\|webm\)")"
11mpv "$(grep "$filename" <<< "$filepath")"
12