commit 7642b1fb4585ec1757af2f1958f6ca864d0898a4
parent e100e701032a4603ae881e685194be08deefa11b
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Sat, 26 Jan 2019 14:51:22 -0500
Add command to adjust lf column layout.
Diffstat:
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
@@ -23,6 +23,20 @@ set scrolloff 10
# enable ANSI 256 color escape code support
set color256 on
+# panel ratios
+cmd recol &{{
+ w=$(tput cols)
+ if [ $w -le 80 ]; then
+ lf -remote "send $id set ratios 1:2"
+ elif [ $w -le 160 ]; then
+ lf -remote "send $id set ratios 1:2:3"
+ else
+ lf -remote "send $id set ratios 1:2:3:5"
+ fi
+}}
+map <c-g> recol
+recol
+
# use enter for shell commands
map <enter> shell
@@ -45,9 +59,6 @@ map <c-s> $lf -remote "send $id select '$(fd --no-ignore-vcs -t d | fzf)'"
# Include hidden ones.
map <a-s> $lf -remote "send $id select '$(fd --no-ignore-vcs -H -t d | fzf)'"
-# Reload
-map <c-g> reload
-
# define a custom 'open' command
# This command is called when current file is not a directory. You may want to
# use either file extensions and/or mime types here. Below uses an editor for