mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Re-add zeltak mode.
This commit is contained in:
parent
d3157e336f
commit
a83a06a95c
7 changed files with 28 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
||||||
- Word movement in entry box. (#126)
|
- Word movement in entry box. (#126)
|
||||||
- PID file to avoid duplicate Rofi.
|
- PID file to avoid duplicate Rofi.
|
||||||
- Generic keybinding and launching for modi. (#128)
|
- Generic keybinding and launching for modi. (#128)
|
||||||
|
- Auto select mode (previously called zeltak mode)
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
- Shift left/right movement between modi (#125)
|
- Shift left/right movement between modi (#125)
|
||||||
- Document updates (#123,#116,#124,etc.)
|
- Document updates (#123,#116,#124,etc.)
|
||||||
|
|
|
@ -102,6 +102,8 @@ Settings config = {
|
||||||
/** Sidebar mode, show the switchers */
|
/** Sidebar mode, show the switchers */
|
||||||
.sidebar_mode = FALSE,
|
.sidebar_mode = FALSE,
|
||||||
/** Lazy mode setting */
|
/** Lazy mode setting */
|
||||||
.lazy_filter_limit = 5000
|
.lazy_filter_limit = 5000,
|
||||||
|
/** auto select */
|
||||||
|
.auto_select = FALSE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ rofi - A window switcher, run dialog and dmenu replacement
|
||||||
[ -version ]
|
[ -version ]
|
||||||
[ -help]
|
[ -help]
|
||||||
[ -dump-xresources ]
|
[ -dump-xresources ]
|
||||||
|
[ -auto-select ]
|
||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
||||||
|
@ -267,6 +268,10 @@ daemon listening to specific key-combinations.
|
||||||
|
|
||||||
Default: *5000*
|
Default: *5000*
|
||||||
|
|
||||||
|
`-auto-select`
|
||||||
|
|
||||||
|
When one entry is left, automatically select this.
|
||||||
|
|
||||||
### PATTERN setting
|
### PATTERN setting
|
||||||
|
|
||||||
`-terminal`
|
`-terminal`
|
||||||
|
|
|
@ -41,6 +41,7 @@ rofi \- A window switcher, run dialog and dmenu replacement
|
||||||
[ \-version ]
|
[ \-version ]
|
||||||
[ \-help]
|
[ \-help]
|
||||||
[ \-dump\-xresources ]
|
[ \-dump\-xresources ]
|
||||||
|
[ \-auto\-select ]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.PP
|
.PP
|
||||||
\fBrofi\fP is an X11 popup window switcher, run dialog, dmenu replacement and more. It focusses on
|
\fBrofi\fP is an X11 popup window switcher, run dialog, dmenu replacement and more. It focusses on
|
||||||
|
@ -340,6 +341,14 @@ To show sidebar use:
|
||||||
for 250ms. Experiments shows that the default (5000 lines) works well, set to 0 to always enable.
|
for 250ms. Experiments shows that the default (5000 lines) works well, set to 0 to always enable.
|
||||||
.PP
|
.PP
|
||||||
Default: \fI5000\fP
|
Default: \fI5000\fP
|
||||||
|
.PP
|
||||||
|
\fB\fC\-auto\-select\fR
|
||||||
|
.PP
|
||||||
|
.RS
|
||||||
|
.nf
|
||||||
|
When one entry is left, automatically select this.
|
||||||
|
.fi
|
||||||
|
.RE
|
||||||
.SS PATTERN setting
|
.SS PATTERN setting
|
||||||
.PP
|
.PP
|
||||||
\fB\fC\-terminal\fR
|
\fB\fC\-terminal\fR
|
||||||
|
|
|
@ -198,6 +198,8 @@ typedef struct _Settings
|
||||||
unsigned int sidebar_mode;
|
unsigned int sidebar_mode;
|
||||||
/** Lazy filter limit. */
|
/** Lazy filter limit. */
|
||||||
unsigned int lazy_filter_limit;
|
unsigned int lazy_filter_limit;
|
||||||
|
/** Auto select. */
|
||||||
|
unsigned int auto_select;
|
||||||
} Settings;
|
} Settings;
|
||||||
|
|
||||||
/** Global Settings structure. */
|
/** Global Settings structure. */
|
||||||
|
|
|
@ -788,6 +788,12 @@ static void menu_refilter ( MenuState *state, char **lines, menu_match_cb mmc, v
|
||||||
}
|
}
|
||||||
state->selected = MIN ( state->selected, state->filtered_lines - 1 );
|
state->selected = MIN ( state->selected, state->filtered_lines - 1 );
|
||||||
|
|
||||||
|
if ( config.auto_select == TRUE && state->filtered_lines == 1 ) {
|
||||||
|
*( state->selected_line ) = state->line_map[state->selected];
|
||||||
|
state->retv = MENU_OK;
|
||||||
|
state->quit = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
state->refilter = FALSE;
|
state->refilter = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,8 @@ static XrmOption xrmOptions[] = {
|
||||||
{ xrm_Boolean, "case-sensitive", { .num = &config.case_sensitive }, NULL },
|
{ xrm_Boolean, "case-sensitive", { .num = &config.case_sensitive }, NULL },
|
||||||
{ xrm_Boolean, "sidebar-mode", { .num = &config.sidebar_mode }, NULL },
|
{ xrm_Boolean, "sidebar-mode", { .num = &config.sidebar_mode }, NULL },
|
||||||
{ xrm_Number, "lazy-filter-limit", { .num = &config.lazy_filter_limit }, NULL },
|
{ xrm_Number, "lazy-filter-limit", { .num = &config.lazy_filter_limit }, NULL },
|
||||||
{ xrm_SNumber, "eh", { .snum = &config.element_height }, NULL }
|
{ xrm_SNumber, "eh", { .snum = &config.element_height }, NULL },
|
||||||
|
{ xrm_Boolean, "auto-select", { .num = &config.auto_select }, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
// Dynamic options.
|
// Dynamic options.
|
||||||
|
|
Loading…
Reference in a new issue