aboutsummaryrefslogtreecommitdiff
path: root/.config/lf/scope
diff options
context:
space:
mode:
Diffstat (limited to '.config/lf/scope')
-rwxr-xr-x.config/lf/scope9
1 files changed, 9 insertions, 0 deletions
diff --git a/.config/lf/scope b/.config/lf/scope
new file mode 100755
index 0000000..11e54e1
--- /dev/null
+++ b/.config/lf/scope
@@ -0,0 +1,9 @@
+#!/bin/sh
+case "$(file -Lb --mime-type -- "$1")" in
+ image/*)
+ chafa -f sixel -s "$2x$3" --animate off --polite on -t 1 --bg black "$1"
+ ;;
+ text/*)
+ bat "$1"
+ ;;
+esac