Skip to content

Commit

Permalink
Better descriptions for sort options group
Browse files Browse the repository at this point in the history
It's unobvious from documentation, that sort only works against filtered menu.

Signed-off-by: Dave Davenport <[email protected]>
  • Loading branch information
nick87720z authored and DaveDavenport committed Jul 23, 2023
1 parent c980139 commit 81641d0
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion doc/rofi-keys.5
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ Toggle case sensitivity

.SS \fBkb-toggle-sort\fP
.PP
Toggle sort
Toggle filtered menu sort

.PP
\fBDefault\fP: Alt+grave
Expand Down
2 changes: 1 addition & 1 deletion doc/rofi-keys.5.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ Toggle case sensitivity

### **kb-toggle-sort**

Toggle sort
Toggle filtered menu sort

**Default**: Alt+grave

Expand Down
59 changes: 30 additions & 29 deletions doc/rofi.1
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,30 @@ next keyword). Set to '\\x0' to disable.
.PP
Default: '-'

.SS Filtered menu sort
.PP
\fB\fC-sort\fR to enable
.br
\fB\fC-no-sort\fR to disable

.PP
Enable, disable sort for filtered menu.
This setting can be changed at runtime (see \fB\fC-kb-toggle-sort\fR).

.PP
\fB\fC-sorting-method\fR 'method' to specify the sort method.

.PP
There are 2 methods:

.RS
.IP \(bu 2
\fBlevenshtein\fP (Default)
.IP \(bu 2
\fBfzf\fP

.RE

.SS Layout and Theming
.PP
\fBIMPORTANT:\fP In newer \fBrofi\fP releases, all the theming options have been
Expand Down Expand Up @@ -744,14 +768,11 @@ When one entry is left, automatically select it.

.PP
\fB\fC-m\fR \fInum\fP

.PP
.br
\fB\fC-m\fR \fIname\fP

.PP
.br
\fB\fC-monitor\fR \fInum\fP

.PP
.br
\fB\fC-monitor\fR \fIname\fP

.PP
Expand Down Expand Up @@ -893,6 +914,7 @@ Default: \fIdisabled\fP

.PP
\fB\fC-parse-known-hosts\fR
.br
\fB\fC-no-parse-known-hosts\fR

.PP
Expand Down Expand Up @@ -1097,36 +1119,15 @@ Default: {mode} {text}
.PP
Note: This setting is ignored if \fB\fCcombi-hide-mode-prefix\fR is enabled.

.SS History and Sorting
.SS History
.PP
\fB\fC-disable-history\fR
.br
\fB\fC-no-disable-history\fR (re-enable history)

.PP
Disable history

.PP
\fB\fC-sort\fR to enable
\fB\fC-no-sort\fR to disable

.PP
Enable, disable sorting.
This setting can be changed at runtime (see \fB\fC-kb-toggle-sort\fR).

.PP
\fB\fC-sorting-method\fR 'method' to specify the sorting method.

.PP
There are 2 sorting methods:

.RS
.IP \(bu 2
levenshtein (Default)
.IP \(bu 2
fzf sorting.

.RE

.PP
\fB\fC-max-history-size\fR \fInumber\fP

Expand Down
45 changes: 22 additions & 23 deletions doc/rofi.1.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,21 @@ next keyword). Set to '\x0' to disable.

Default: '-'

### Filtered menu sort

`-sort` to enable
`-no-sort` to disable

Enable, disable sort for filtered menu.
This setting can be changed at runtime (see `-kb-toggle-sort`).

`-sorting-method` 'method' to specify the sort method.

There are 2 methods:

- **levenshtein** (Default)
- **fzf**

### Layout and Theming

**IMPORTANT:** In newer **rofi** releases, all the theming options have been
Expand Down Expand Up @@ -475,13 +490,10 @@ Default: *1*

When one entry is left, automatically select it.

`-m` *num*

`-m` *name*

`-monitor` *num*

`-monitor` *name*
`-m` *num*
`-m` *name*
`-monitor` *num*
`-monitor` *name*

Select monitor to display **rofi** on. It accepts as input: *primary* (if
primary output is set), the *xrandr* output name, or integer number (in order
Expand Down Expand Up @@ -575,7 +587,7 @@ Parse the `/etc/hosts` file for entries.

Default: *disabled*

`-parse-known-hosts`
`-parse-known-hosts`
`-no-parse-known-hosts`

Parse the `~/.ssh/known_hosts` file for entries.
Expand Down Expand Up @@ -708,26 +720,13 @@ Default: {mode} {text}

Note: This setting is ignored if `combi-hide-mode-prefix` is enabled.

### History and Sorting
### History

`-disable-history`
`-disable-history`
`-no-disable-history` (re-enable history)

Disable history

`-sort` to enable
`-no-sort` to disable

Enable, disable sorting.
This setting can be changed at runtime (see `-kb-toggle-sort`).

`-sorting-method` 'method' to specify the sorting method.

There are 2 sorting methods:

- levenshtein (Default)
- fzf sorting.

`-max-history-size` *number*

Maximum number of entries to store in history. Defaults to 25. (WARNING: can
Expand Down
4 changes: 2 additions & 2 deletions source/xrmoptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ static XrmOption xrmOptions[] = {
"sort",
{.num = &config.sort},
NULL,
"Use sorting",
"Sort menu when filtered",
CONFIG_DEFAULT},
{xrm_String,
"sorting-method",
{.str = &config.sorting_method},
NULL,
"Choose the strategy used for sorting: normal (levenshtein) or fzf.",
"Choose sort strategy: normal (levenshtein) or fzf.",
CONFIG_DEFAULT},
{xrm_Boolean,
"case-sensitive",
Expand Down

0 comments on commit 81641d0

Please sign in to comment.