mirror of
https://github.com/Ascyii/scripts.git
synced 2026-01-01 04:44:24 -05:00
16 lines
415 B
Bash
Executable File
16 lines
415 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Find all .mp4 files in the current directory and subdirectories
|
|
media_files=$(find . -type f \( -name "*.mp4" -o -name "*.mp3" \))
|
|
|
|
# Use fzf to allow the user to select a file
|
|
selected_file=$(echo "$media_files" | fzf)
|
|
|
|
# Check if a file was selected
|
|
if [[ -n $selected_file ]]; then
|
|
# Play the selected file with mpv
|
|
mpv "$selected_file" --save-position-on-quit
|
|
else
|
|
echo "No file selected."
|
|
fi
|