From c5171e72e00215fa6eec882f47f52b9ec0ad4cb4 Mon Sep 17 00:00:00 2001 From: "committer@tuxwarrior" Date: Sun, 13 Apr 2025 13:53:14 -0500 Subject: [PATCH] /+ recol --- dots/lf/lfrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dots/lf/lfrc b/dots/lf/lfrc index 264c7b1..0ce51e8 100644 --- a/dots/lf/lfrc +++ b/dots/lf/lfrc @@ -85,6 +85,17 @@ cmd open ${{ }} +# reconfigure columns, based on with | https://github.com/gokcehan/lf/blob/master/doc.md +cmd recol %{{ + if [ $lf_width -le 80 ]; then + lf -remote "send $id set ratios 1:2" + elif [ $lf_width -le 160 ]; then + lf -remote "send $id set ratios 1:2:3" + else + lf -remote "send $id set ratios 1:2:3:5" + fi +}} + #cmd open ${{ # test -L $f && f=$(readlink -f $f) # case $(file --mime-type $f -b) in