Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on-redraw not being called on terminal resize #1642

Closed
ehula opened this issue Mar 15, 2024 · 3 comments
Closed

on-redraw not being called on terminal resize #1642

ehula opened this issue Mar 15, 2024 · 3 comments

Comments

@ehula
Copy link

ehula commented Mar 15, 2024

I am running kitty on NixOS. I have on-redraw configured to change 'ratios' depending on terminal width. When I resize the terminal, the ratios do not change automatically. If I manually run ":on-redraw", then the ratios properly get set.

@joelim-work
Copy link
Collaborator

What version of lf are you running, and can you provide a minimal config file?

Also does something like the following work?

# move the cursor down as a test
cmd on-redraw down

@ehula
Copy link
Author

ehula commented Mar 18, 2024

version: r31

`
set cleaner "ctpvclear"
set dircounts
set hidden
set ifs "
"
set info "size:time"
set period 1
set previewer "ctpv"
set ratios "1:2:3"
set scrolloff 5
set shell "bash"
set shellopts "-eu"

cmd extract %{{
set -f
case $f in
.tar.bz|.tar.bz2|.tbz|.tbz2) tar xjvf $f;;
.tar.gz|.tgz) tar xzvf $f;;
.tar.xz|.txz) tar xJvf $f;;
*.zip) unzip $f;;
*.rar) unrar x $f;;
*.7z) 7z x $f;;
esac
}}
cmd mkdir %{{
printf "Directory name: "
read ans
mkdir $ans
}}
cmd mkfile %{{
printf "File name: "
read ans
kitty -e kak $ans
}}
cmd on-redraw %{{
down
}}
cmd trash %{{
trash-put $fx
}}
cmd zip %{{
set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}

map . set hidden!
map shell
map DD trash
map O $mimeopen --ask $f
map X !$f
map gd cd /mnt/media/downloads
map gm cd /mnt/media/movies/theatrical
map gs cd /mnt/media/tv/shows
map m
map md mkdir
map mf mkfile
map o &mimeopen $f
map p : paste; clear
map x $$f
`
'cmd on-redraw down' did not work

@joelim-work
Copy link
Collaborator

joelim-work commented Mar 18, 2024

Thanks.

So the on-redraw hook was added after version r31 was released. It should be made available from version r32 onwards (hopefully coming soon), see #1427 for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants