Krolyxon
Commit c5663ed

Branches

Refs →

dotfiles-x11.localbinmovie

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

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