If autoquit is enabled, then running lf -remote commands immediately in the config file will fail as the server hasn't started yet. This change adds an on-init hook command, for anything that should run after lf has finished initializing and connecting to the server.
set autoquit true
set drawbox true
cmd on-redraw &{{
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 on-init on-redraw
# the following will not work if used instead of `on-init`
# on-redraw
See https://github.com/gokcehan/lf/discussions/1767#discussioncomment-9942888 for more details.
If
autoquit
is enabled, then runninglf -remote
commands immediately in the config file will fail as the server hasn't started yet. This change adds anon-init
hook command, for anything that should run afterlf
has finished initializing and connecting to the server.