Option to change look of cursors in parent dirs, rename an option. (#1106)
* Add `cursorparentfmt` option for cursors in parent dirs The option defaults to the same value as `cursorfmt`, so the default look of `lf` is unchanged. However, I find it useful to make it different, since I seem to have so much trouble figuring out which of my cursors is the active one. :) For example, here's what it looks like if one has `set cursorparentfmt "\033[7;90m"` in their `lfrc`: https://user-images.githubusercontent.com/4123047/218299130-09ac411f-307a-489e-a4f0-4691710f8549.png * Remove `cursorfmt` option to `cursoractivefmt` This seems appropriate after introducing `cursorparentfmt`
This commit is contained in:
1 parent
c0c85f206f
commit
6afefa5d09
7 files changed
+65
-34
No files matched your search
@@ -133,7 +133,8 @@ The following options can be used to customize the behavior of lf:
|
||||
anchorfind bool (default on)
|
||||
autoquit bool (default off)
|
||||
cleaner string (default '')
|
||||
cursorfmt string (default "\e033[7m")
|
||||
cursoractivefmt string (default "\e033[7m")
|
||||
cursorparentfmt string (default "\e033[7m")
|
||||
cursorpreviewfmt string (default "\e033[4m")
|
||||
dircache bool (default on)
|
||||
dircounts bool (default off)
|
||||
@@ -750,15 +751,16 @@ Automatically quit server when there are no clients left connected.
|
||||
Set the path of a cleaner file. The file should be executable. This file is called if previewing is enabled, the previewer is set, and the previously selected file had its preview cache disabled. Five arguments are passed to the file, (1) current file name, (2) width, (3) height, (4) horizontal position, and (5) vertical position of preview pane respectively. Preview clearing is disabled when the value of this option is left empty.
|
||||
.PP
|
||||
.EX
|
||||
cursorfmt string (default "\e033[7m")
|
||||
cursoractivefmt string (default "\e033[7m")
|
||||
cursorparentfmt string (default "\e033[7m")
|
||||
cursorpreviewfmt string (default "\e033[4m")
|
||||
.EE
|
||||
.PP
|
||||
Format strings for highlighting the cursor. `cursorpreviewfmt` applies in panes that preview directories, and `cursorfmt` applies in all other panes.
|
||||
Format strings for highlighting the cursor. `cursoractivefmt` applies in the current directory pane, `cursorparentfmt` applies in panes that show parents of the current directory, and `cursorpreviewfmt` applies in panes that preview directories.
|
||||
.PP
|
||||
The default is to make the normal cursor inverted and the preview cursor underlined.
|
||||
The default is to make the active cursor and the parent directory cursor inverted. The preview cursor is underlined.
|
||||
.PP
|
||||
Some other possibilities to consider for the preview cursor: an empty string for no cursor, "\e033[7;2m" for dimmed inverted text (visibility varies by terminal), "\e033[7;90m" for inverted text with grey (aka "brightblack") background.
|
||||
Some other possibilities to consider for the preview or parent cursors: an empty string for no cursor, "\e033[7;2m" for dimmed inverted text (visibility varies by terminal), "\e033[7;90m" for inverted text with grey (aka "brightblack") background.
|
||||
.PP
|
||||
If the format string contains the characters `%s`, it is interpreted as a format string for `fmt.Sprintf`. Such a string should end with the terminal reset sequence. For example, "\e033[4m%s\e033[0m" has the same effect as "\e033[4m".
|
||||
.PP
|
||||
|
||||
Reference in new issue
Block a user