Files
scripts/shell/mp4.sh
2025-09-18 11:35:56 +02:00

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