aboutsummaryrefslogtreecommitdiff
path: root/example-config.toml
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-11-07 12:25:47 +0530
committerAkshay Nair <phenax5@gmail.com>2025-11-08 17:09:25 +0530
commita16933476187a349d619ab29f73dbcae81c8cb24 (patch)
treeeab12977c61a2c3b9ac88b22637f5511c21f9d18 /example-config.toml
parent6c3f7442b92f2fbf2308d93ece448cf3dd759a58 (diff)
downloaddaffm-a16933476187a349d619ab29f73dbcae81c8cb24.tar.gz
daffm-a16933476187a349d619ab29f73dbcae81c8cb24.zip
Show error messages (permission error + path not found + invalid command error)
Diffstat (limited to 'example-config.toml')
-rw-r--r--example-config.toml16
1 files changed, 11 insertions, 5 deletions
diff --git a/example-config.toml b/example-config.toml
index ccadfd8..2947c73 100644
--- a/example-config.toml
+++ b/example-config.toml
@@ -50,13 +50,13 @@ xclip -selection clipboard -t $(file --mime-type % -bL) -i %
"\\x7" = "!!7z x %f"
"\\xt" = "!!tar xzf %f"
"\\xr" = "!!unrar x %f"
-"\\wi" = "!!wine %"
-"<space>p" = ["!clear", "preview"]
+"<space>p" = "preview"
[commands]
-preview = """!!
-file="%args"
+preview = """shell!
+file='%args'
if [ -z "$file" ]; then file=%; fi
+clear;
case "$file" in
*.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.gif) chafa -f kitty $file ;;
*.wav|*.mp3|*.flac|*.m4a|*.wma|*.ac3|*.og[agx]|*.opus|*.flac)
@@ -77,6 +77,12 @@ case "$file" in
*.rar) unrar l $file ;;
*.7z) 7z l $file ;;
*.o) nm $file | less ;;
- *) bat --color always $file || cat $file ;;
+ *)
+ if isutf8 -q "$file"; then
+ bat --color always $file || cat $file
+ else
+ mediainfo "$file"
+ fi
+ ;;
esac
"""