From ae4a05b9e0ba20d67f209e0f6e32fecd1cfc84bd Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Fri, 21 Mar 2025 08:05:27 +0100 Subject: [PATCH] lf: set cursor states --- dot-config/lf/lfrc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 -- 2.51.2