voidrice/.local/bin/videosearch
2023-11-18 22:39:31 +03:00

5 lines
263 B
Bash

#!/bin/sh
video_files=$(locate -d ~/.config/.mymlocate.db -b -r '.*\.\(mp4\|mkv\|webm\|mov\|m4v\|wmv\|flv\|avi\)$')
chosen_file=$(echo "$video_files" | sed 's|.*/||; s/\.[^.]*$//' | dmenu -p "Select Video")
mpv "$(echo "$video_files" | grep -F "/$chosen_file.")"