summaryrefslogtreecommitdiff
path: root/.config/lf/previewer
diff options
context:
space:
mode:
authorDrNuget <drnuget@outlook.com>2025-01-20 10:50:11 +0200
committerDrNuget <drnuget@outlook.com>2025-01-20 10:50:11 +0200
commiteec5ff0fe22b25dcb0d78014eb73f8bceb318e17 (patch)
tree96197474be80d3cd3002a7409f97e3e95d08222d /.config/lf/previewer
parentb9f9db9457946e08df8064ae46fbc27f190477b0 (diff)
lfrc and image previews
Diffstat (limited to '.config/lf/previewer')
-rwxr-xr-x.config/lf/previewer11
1 files changed, 11 insertions, 0 deletions
diff --git a/.config/lf/previewer b/.config/lf/previewer
new file mode 100755
index 0000000..8f04c1a
--- /dev/null
+++ b/.config/lf/previewer
@@ -0,0 +1,11 @@
+#!/bin/sh
+case "$(file -Lb --mime-type -- "$1")" in
+ image/*)
+ chafa -f sixel -s "$2x$3" --animate off --polite on "$1"
+ exit 1
+ ;;
+ text/*)
+ #cat "$1"
+ pygmentize -g $1
+ ;;
+esac