diff --git a/.config/lf/lfrc b/.config/lf/lfrc index fe52cf3d..2d2c7a2f 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -9,6 +9,8 @@ set wrapscroll set period 1 set cursorpreviewfmt "\033[7;90m" set promptfmt # this is set in a function later +set previewer ~/.config/lf/preview/ueberzug +set cleaner ~/.config/lf/preview/clean # HACK: This is needed to trigger the opening function of the taolf nvim plugin cmd open ${{ @@ -198,32 +200,33 @@ cmd extract ${{ done }} -cmd set_previewer &{{ - if [ "${1}" = "sixel" ]; then - lf -remote "send $id :set sixel; set previewer ~/.config/lf/preview/sixel" - # echo 'Previewer set to sixel' - elif [ "${1}" = "ueberzug" ]; then - lf -remote "send $id :set cleaner ~/.config/lf/preview/clean; set previewer ~/.config/lf/preview/ueberzug" - # echo 'Previewer set to ueberzug' - else - lf -remote "send $id :set previewer ~/.config/lf/preview/chafa" - # echo 'Previewer set to chafa' - fi -}} +# cmd set_previewer &{{ +# if [ "${1}" = "sixel" ]; then +# lf -remote "send $id :set sixel; set previewer ~/.config/lf/preview/sixel" +# # echo 'Previewer set to sixel' +# elif [ "${1}" = "ueberzug" ]; then +# lf -remote "send $id :set cleaner ~/.config/lf/preview/clean; set previewer ~/.config/lf/preview/ueberzug" +# # echo 'Previewer set to ueberzug' +# else +# lf -remote "send $id :set previewer ~/.config/lf/preview/chafa" +# # echo 'Previewer set to chafa' +# fi +# }} # HACK: This is a dirty hack to have an lf terminal that I can "exit" out of into a shell cmd new_lf_term &{{ mapcmd='map q $sh -c "tmux; kill $id"' - previewercmd="set_previewer $(basename "$lf_previewer")" - $TERMINAL -e lfX -command "${previewercmd}; ${mapcmd}" + # previewercmd="set_previewer $(basename "$lf_previewer")" + # $TERMINAL -e lfX -command "${previewercmd}; ${mapcmd}" + $TERMINAL -e lfX -command "$mapcmd" }} &{{ set +u - previewer=ueberzug + # previewer=ueberzug # [ -n "$TMUX" ] && previewer=ueberzug # [ -n "$VIM" ] && previewer=chafa - lf -remote "send $id set_previewer $previewer" + # lf -remote "send $id set_previewer $previewer" # Clean up tags that don't exist anymore # BUG: causes an obscure lf crash when tags are empty