mirror of
https://github.com/Ascyii/scripts.git
synced 2026-01-01 04:44:24 -05:00
Init
This commit is contained in:
15
shell/mp4.sh
Executable file
15
shell/mp4.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user