Merge fe8f0bce94e051c0a88972134aafad6050ae8149 into 1e3adf9c03b2e563e81a13d6907ffd5ca20b887a

This commit is contained in:
Emre AKYÜZ 2023-10-28 10:06:33 +03:00 committed by GitHub
commit dabcf0f0ca
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"