diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-16 23:03:10 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-06-16 23:03:10 +0900 |
| commit | 8f1058060617b16edfdeb5506891977b6013b70f (patch) | |
| tree | cbdf26823b61ad49a4061dbd4f4ed1219742efcd | |
| parent | 0cccda75e43b9db1b1d86b447bacfbb7bdb93380 (diff) | |
modified bin/fzffiles
| -rwxr-xr-x | ar/.local/bin/fzffiles | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ar/.local/bin/fzffiles b/ar/.local/bin/fzffiles index 55793e9..5dd97bc 100755 --- a/ar/.local/bin/fzffiles +++ b/ar/.local/bin/fzffiles @@ -42,9 +42,13 @@ files=$(fzf-tmux \ # Check if any files were selected, and exit if not [ -z "$files" ] && exit 0 -absolute_files=$(realpath $files) -if echo "$absolute_files" | while read -r file; do file --mime-type "$file" | grep -q 'video/'; done; then - mpv --quiet --loop $absolute_files +if [ -d "$files" ]; then + absolute_files=$(realpath $files) + if echo "$absolute_files" | while read -r file; do file --mime-type "$file" | grep -q 'video/'; done; then + mpv --quiet --loop $absolute_files + else + openfiles "$absolute_files" + fi else - openfiles "$absolute_files" + openfiles "$files" fi |
