From eec5ff0fe22b25dcb0d78014eb73f8bceb318e17 Mon Sep 17 00:00:00 2001 From: DrNuget Date: Mon, 20 Jan 2025 10:50:11 +0200 Subject: lfrc and image previews --- .config/lf/lfrc | 3 +++ .config/lf/previewer | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 .config/lf/lfrc create mode 100755 .config/lf/previewer (limited to '.config') diff --git a/.config/lf/lfrc b/.config/lf/lfrc new file mode 100644 index 0000000..6e556f3 --- /dev/null +++ b/.config/lf/lfrc @@ -0,0 +1,3 @@ +set sixel +set previewer ~/.config/lf/previewer +set hidden! 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 -- cgit v1.2.3