aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorawy <awy@tutamail.com>2024-08-07 14:58:33 +0300
committerawy <awy@tutamail.com>2024-08-07 14:58:33 +0300
commit1df65c4481f61d5aa9b486074ec2c766057748c8 (patch)
tree892d4dc99897c4e8f781213f3c48e00ce52e2672
parentdf9a87b345211d67dfae0f9ec6e388398d17063b (diff)
lf updater
-rw-r--r--.config/lf/lfrc7
-rwxr-xr-x.config/lf/scope2
2 files changed, 8 insertions, 1 deletions
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index 2be3b1c..685f374 100644
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -2,6 +2,13 @@ set sixel true
set cleaner ~/.config/lf/cleaner
set previewer ~/.config/lf/scope
+cmd open ${{
+ case $(file --mime-type "$(readlink -f $f)" -b) in
+ text/*|application/json|inode/x-empty|application/x-subrip) $EDITOR $fx;;
+ *) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
+ esac
+}}
+
cmd delete ${{
clear; tput cup $(($(tput lines)/3)); tput bold
set -f
diff --git a/.config/lf/scope b/.config/lf/scope
index bb9f1f6..b00501a 100755
--- a/.config/lf/scope
+++ b/.config/lf/scope
@@ -25,4 +25,4 @@ case "$(file -Lb --mime-type "$file")" in
text/* | */xml | application/json | application/x-ndjson) bat -p --theme ansi --terminal-width "$(($4-2))" -f "$1" ;;
esac
-pistol "$file"lace "${2}x${3}@${4}x${5}" "$1"
+#pistol "$file"lace "${2}x${3}@${4}x${5}" "$1"