Merge fe8f0bce94e051c0a88972134aafad6050ae8149 into 708d6c67317ca90138681d4a7892cc5db2e092cc

This commit is contained in:
Emre AKYÜZ 2023-10-18 03:05:23 +03:00 committed by GitHub
commit 6291d51e6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
.local/bin/videosearch Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
tempfile=$(mktemp)
locate -d ~/.config/.mymlocate.db -b -r '.*\.\(mp4\|mkv\|webm\|mov\|m4v\|wmv\|flv\|avi\)$' > "$tempfile"
chosen_name=$(sed 's|.*/||; s/\.[^.]*$//' "$tempfile" | dmenu -i -l 10 -p "Select a video file:")
chosen_path=$(grep "/$chosen_name\." "$tempfile")
mpv "$chosen_path"
rm -f "$tempfile"