Skip to content

Commit

Permalink
Border around the header section
Browse files Browse the repository at this point in the history
Close #4159
  • Loading branch information
junegunn committed Jan 5, 2025
1 parent 45fc7b9 commit a5beb08
Show file tree
Hide file tree
Showing 9 changed files with 757 additions and 292 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ CHANGELOG
- Actions
- `change-list-label`
- `transform-list-label`
- Border and label for the input section (prompt and info)
- Border and label for the input section (prompt line and info line)
- Options
- `--input-border[=STYLE]`
- `--input-label=LABEL`
Expand All @@ -29,6 +29,19 @@ CHANGELOG
- Actions
- `change-input-label`
- `transform-input-label`
- Border and label for the header section
- Options
- `--header-border[=STYLE]`
- `--header-label=LABEL`
- `--header-label-pos=COL[:bottom]`
- Colors
- `header-fg` (`header`)
- `header-bg`
- `header-border`
- `header-label`
- Actions
- `change-header-label`
- `transform-header-label`
- Added `--preview-border[=STYLE]` as short for `--preview-window=border[-STYLE]`
- You can specify `border-native` to `--tmux` so that native tmux border is used instead of `--border`. This can be useful if you start a different program from inside the popup.
```sh
Expand Down
51 changes: 46 additions & 5 deletions man/man1/fzf.1
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Choose the layout (default: default)
A synonym for \fB\-\-layout=reverse\fB

.TP
.BI "\-\-border" [=BORDER_OPT]
.BI "\-\-border" [=STYLE]
Draw border around the finder

.br
Expand Down Expand Up @@ -387,6 +387,42 @@ the label. Label is printed on the top border line by default, add
\fB:bottom\fR to put it on the border line on the bottom. The default value
\fB0 (or \fBcenter\fR) will put the label at the center of the border line.

.TP
.BI "\-\-list\-border" [=STYLE]
Draw border around the list section

.TP
.BI "\-\-list\-label" [=LABEL]
Label to print on the list border

.TP
.BI "\-\-list\-label\-pos" [=N[:top|bottom]]
Position of the list label

.TP
.BI "\-\-input\-border" [=STYLE]
Draw border around the input section

.TP
.BI "\-\-input\-label" [=LABEL]
Label to print on the input border

.TP
.BI "\-\-input\-label\-pos" [=N[:top|bottom]]
Position of the input label

.TP
.BI "\-\-header\-border" [=STYLE]
Draw border around the header section

.TP
.BI "\-\-header\-label" [=LABEL]
Label to print on the header border

.TP
.BI "\-\-header\-label\-pos" [=N[:top|bottom]]
Position of the header label

.TP
.B "\-\-no\-unicode"
Use ASCII characters instead of Unicode drawing characters to draw borders,
Expand Down Expand Up @@ -563,7 +599,8 @@ color mappings.
\fBlist\-bg \fRList section background
\fBselected\-bg \fRSelected line background
\fBpreview\-bg \fRPreview window background
\fBinput\-bg \fRInput section background
\fBinput\-bg \fRInput window background (\fB\-\-input\-border\fR)
\fBheader\-bg \fRHeader window background (\fB\-\-header\-border\fR)
\fBhl \fRHighlighted substrings
\fBselected\-hl \fRHighlighted substrings in the selected line
\fBcurrent\-fg (fg+) \fRText (current line)
Expand All @@ -579,16 +616,18 @@ color mappings.
\fBseparator \fRHorizontal separator on info line
\fBpreview\-border \fRBorder around the preview window (\fB\-\-preview\fR)
\fBpreview\-scrollbar \fRScrollbar
\fBinput\-border \fRBorder around the input section (\fB\-\-input\-border\fR)
\fBinput\-border \fRBorder around the input window (\fB\-\-input\-border\fR)
\fBheader\-border \fRBorder around the header window (\fB\-\-header\-border\fR)
\fBlabel \fRBorder label (\fB\-\-border\-label\fR, \fB\-\-list\-label\fR, \fB\-\-input\-label\fR, and \fB\-\-preview\-label\fR)
\fBlist\-label \fRBorder label of the list section (\fB\-\-list\-label\fR)
\fBpreview\-label \fRBorder label of the preview window (\fB\-\-preview\-label\fR)
\fBinput\-label \fRBorder label of the input section (\fB\-\-input\-label\fR)
\fBinput\-label \fRBorder label of the input window (\fB\-\-input\-label\fR)
\fBheader\-label \fRBorder label of the header window (\fB\-\-header\-label\fR)
\fBprompt \fRPrompt
\fBpointer \fRPointer to the current line
\fBmarker \fRMulti\-select marker
\fBspinner \fRStreaming input indicator
\fBheader \fRHeader
\fBheader (header\-fg) \fRHeader

.B ANSI COLORS:
\fB\-1 \fRDefault terminal foreground/background color
Expand Down Expand Up @@ -1454,6 +1493,7 @@ A key or an event can be bound to one or more of the following actions.
\fBcancel\fR (clear query string if not empty, abort fzf otherwise)
\fBchange\-border\-label(...)\fR (change \fB\-\-border\-label\fR to the given string)
\fBchange\-header(...)\fR (change header to the given string; doesn't affect \fB\-\-header\-lines\fR)
\fBchange\-header\-label(...)\fR (change \fB\-\-header\-label\fR to the given string)
\fBchange\-input\-label(...)\fR (change \fB\-\-input\-label\fR to the given string)
\fBchange\-list\-label(...)\fR (change \fB\-\-list\-label\fR to the given string)
\fBchange\-multi\fR (enable multi-select mode with no limit)
Expand Down Expand Up @@ -1540,6 +1580,7 @@ A key or an event can be bound to one or more of the following actions.
\fBtransform(...)\fR (transform states using the output of an external command)
\fBtransform\-border\-label(...)\fR (transform border label using an external command)
\fBtransform\-header(...)\fR (transform header using an external command)
\fBtransform\-header\-label(...)\fR (transform header label using an external command)
\fBtransform\-input\-label(...)\fR (transform input label using an external command)
\fBtransform\-list\-label(...)\fR (transform list label using an external command)
\fBtransform\-preview\-label(...)\fR (transform preview label using an external command)
Expand Down
204 changes: 103 additions & 101 deletions src/actiontype_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a5beb08

Please sign in to comment.