From: Andre Ramnitz Date: Fri, 21 Mar 2025 07:05:27 +0000 (+0100) Subject: lf: set cursor states X-Git-Url: https://git.ramnitz.eu/?a=commitdiff_plain;h=ae4a05b9e0ba20d67f209e0f6e32fecd1cfc84bd;p=dotfiles.git lf: set cursor states --- diff --git a/dot-config/lf/lfrc b/dot-config/lf/lfrc index 372c73e1..24b31d83 100644 --- a/dot-config/lf/lfrc +++ b/dot-config/lf/lfrc @@ -43,6 +43,26 @@ set ifs "\n" # leave some space at the top and the bottom of the screen set scrolloff 3 +# hook command which is invoked when the terminal gains focus +cmd on-focus-gained :{{ + set cursorparentfmt "\033[7m" + set cursoractivefmt "\033[7m" + set cursorpreviewfmt "\033[4m" +}} + +# hook command which is invoked when the terminal loses focus +cmd on-focus-lost :{{ + # set cursorparentfmt "\033[7;2m" + # set cursoractivefmt "\033[7;2m" + # set cursorpreviewfmt "\033[4;2m" + set cursorparentfmt "" + set cursoractivefmt "" + set cursorpreviewfmt "" +}} + +# set initial values upon startup +on-focus-gained + # make sure trash folder exists %mkdir -p ~/.trash