commit 528e6a24c21a6a5b0b8e88d74e01da93af460653
parent 639e7df7b470e9bc4547686a75389d4d77e4ca05
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Thu, 17 Oct 2019 16:43:59 -0400
lf: bunch more improvements
Former-commit-id: 49c7f47ca0e8e7d27a5cea1fdfd2e4c92af7f8d9
Diffstat:
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/lf/lfrc b/lf/lfrc
@@ -22,6 +22,9 @@ set ifs "\n"
# leave some space at the top and the bottom of the screen
set scrolloff 10
+set color256 on
+set previewer ~/.config/lf/preview.sh
+
# }}}
# Command definitions {{{
# define a custom 'open' command
@@ -103,7 +106,6 @@ cmd paste_link %{{
}}
# }}}
-
# Mappings {{{
# execute current file (must be executable)
map x $$f
@@ -114,6 +116,7 @@ map o &mimeopen $f
map O $mimeopen --ask $f
map R push :rename<space>
+map cw push :rename<space>
map E $$EDITOR $f
map D delete
map <enter> shell-pipe
@@ -124,6 +127,8 @@ map p
map pp paste
map pl paste_link
+map i $~/.config/lf/preview.sh $f | less -R
+
map gd cd ~/Documents
map gD cd ~/Desktop
map gl cd ~/Downloads
@@ -134,9 +139,10 @@ map gs cd ~/Documents/School
map g. cd ~/.dotfiles
map u
-map ud unselect
-map uy unselect
-map uu clear
+map uu unselect
+map uy clear
+map ud clear
+map a :unselect; invert
map c
map cf push %touch<space>
diff --git a/lf/preview.sh b/lf/preview.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+bat --color=always --theme=base16 "$1"