Merge fe8f0bce94e051c0a88972134aafad6050ae8149 into ea3e1e14cc49d68c9900fb05d9ee7bb9e719688e

This commit is contained in:
Emre AKYÜZ 2023-10-30 20:34:42 +03:00 committed by GitHub
commit c3f7d1e086
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"