mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Super-1..10 keybinding activates row 1..10.
Allowing fore quick switching to entry. https://forum.qtools.org/t/select-entry-by-offset/84/5
This commit is contained in:
parent
d88a5197b5
commit
268b0fa3b0
6 changed files with 83 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
v1.4.0: (unreleased)
|
||||
New Features:
|
||||
- Super-{1-10} activates row 1-10.
|
||||
|
||||
v1.3.1: Dan vs. Greg: The never ending story, reloaded.
|
||||
New Features
|
||||
- [DRun] Search categories. (#449)
|
||||
|
|
|
@ -247,6 +247,26 @@ Global options:
|
|||
Alt+asterisk (File)
|
||||
-kb-custom-19 [string] Custom Keybinding 19
|
||||
Alt+parenleft (File)
|
||||
-kb-select-1 [string] Select row 1
|
||||
Super+1 (Default)
|
||||
-kb-select-2 [string] Select row 2
|
||||
Super+2 (Default)
|
||||
-kb-select-3 [string] Select row 3
|
||||
Super+3 (Default)
|
||||
-kb-select-4 [string] Select row 4
|
||||
Super+4 (Default)
|
||||
-kb-select-5 [string] Select row 5
|
||||
Super+5 (Default)
|
||||
-kb-select-6 [string] Select row 6
|
||||
Super+6 (Default)
|
||||
-kb-select-7 [string] Select row 7
|
||||
Super+7 (Default)
|
||||
-kb-select-8 [string] Select row 8
|
||||
Super+8 (Default)
|
||||
-kb-select-9 [string] Select row 9
|
||||
Super+9 (Default)
|
||||
-kb-select-10 [string] Select row 10
|
||||
Super+0 (Default)
|
||||
-display-ssh [string] The display name of this browser
|
||||
(File)
|
||||
-display-run [string] The display name of this browser
|
||||
|
|
|
@ -210,6 +210,26 @@ rofi.kb-custom-17: Alt+ampersand
|
|||
rofi.kb-custom-18: Alt+asterisk
|
||||
! "Custom Keybinding 19" Set from: File
|
||||
rofi.kb-custom-19: Alt+parenleft
|
||||
! "Select row 1" Set from: Default
|
||||
! rofi.kb-select-1: Super+1
|
||||
! "Select row 2" Set from: Default
|
||||
! rofi.kb-select-2: Super+2
|
||||
! "Select row 3" Set from: Default
|
||||
! rofi.kb-select-3: Super+3
|
||||
! "Select row 4" Set from: Default
|
||||
! rofi.kb-select-4: Super+4
|
||||
! "Select row 5" Set from: Default
|
||||
! rofi.kb-select-5: Super+5
|
||||
! "Select row 6" Set from: Default
|
||||
! rofi.kb-select-6: Super+6
|
||||
! "Select row 7" Set from: Default
|
||||
! rofi.kb-select-7: Super+7
|
||||
! "Select row 8" Set from: Default
|
||||
! rofi.kb-select-8: Super+8
|
||||
! "Select row 9" Set from: Default
|
||||
! rofi.kb-select-9: Super+9
|
||||
! "Select row 10" Set from: Default
|
||||
! rofi.kb-select-10: Super+0
|
||||
! "The display name of this browser" Set from: File
|
||||
rofi.display-ssh:
|
||||
! "The display name of this browser" Set from: File
|
||||
|
|
|
@ -82,6 +82,16 @@ typedef enum
|
|||
CUSTOM_19,
|
||||
SCREENSHOT,
|
||||
TOGGLE_SORT,
|
||||
SELECT_ELEMENT_1,
|
||||
SELECT_ELEMENT_2,
|
||||
SELECT_ELEMENT_3,
|
||||
SELECT_ELEMENT_4,
|
||||
SELECT_ELEMENT_5,
|
||||
SELECT_ELEMENT_6,
|
||||
SELECT_ELEMENT_7,
|
||||
SELECT_ELEMENT_8,
|
||||
SELECT_ELEMENT_9,
|
||||
SELECT_ELEMENT_10,
|
||||
NUM_ABE
|
||||
} KeyBindingAction;
|
||||
|
||||
|
|
|
@ -91,6 +91,16 @@ DefaultBinding bindings[NUM_ABE] =
|
|||
{ .id = CUSTOM_17, .name = "kb-custom-17", .keybinding = "Alt+ampersand", .comment = "Custom keybinding 17" },
|
||||
{ .id = CUSTOM_18, .name = "kb-custom-18", .keybinding = "Alt+asterisk", .comment = "Custom keybinding 18" },
|
||||
{ .id = CUSTOM_19, .name = "kb-custom-19", .keybinding = "Alt+parenleft", .comment = "Custom Keybinding 19" },
|
||||
{ .id = SELECT_ELEMENT_1, .name = "kb-select-1", .keybinding = "Super+1", .comment = "Select row 1" },
|
||||
{ .id = SELECT_ELEMENT_2, .name = "kb-select-2", .keybinding = "Super+2", .comment = "Select row 2" },
|
||||
{ .id = SELECT_ELEMENT_3, .name = "kb-select-3", .keybinding = "Super+3", .comment = "Select row 3" },
|
||||
{ .id = SELECT_ELEMENT_4, .name = "kb-select-4", .keybinding = "Super+4", .comment = "Select row 4" },
|
||||
{ .id = SELECT_ELEMENT_5, .name = "kb-select-5", .keybinding = "Super+5", .comment = "Select row 5" },
|
||||
{ .id = SELECT_ELEMENT_6, .name = "kb-select-6", .keybinding = "Super+6", .comment = "Select row 6" },
|
||||
{ .id = SELECT_ELEMENT_7, .name = "kb-select-7", .keybinding = "Super+7", .comment = "Select row 7" },
|
||||
{ .id = SELECT_ELEMENT_8, .name = "kb-select-8", .keybinding = "Super+8", .comment = "Select row 8" },
|
||||
{ .id = SELECT_ELEMENT_9, .name = "kb-select-9", .keybinding = "Super+9", .comment = "Select row 9" },
|
||||
{ .id = SELECT_ELEMENT_10, .name = "kb-select-10", .keybinding = "Super+0", .comment = "Select row 10" },
|
||||
};
|
||||
|
||||
void setup_abe ( void )
|
||||
|
|
|
@ -1125,6 +1125,25 @@ gboolean rofi_view_trigger_action ( RofiViewState *state, KeyBindingAction actio
|
|||
}
|
||||
break;
|
||||
}
|
||||
case SELECT_ELEMENT_1:
|
||||
case SELECT_ELEMENT_2:
|
||||
case SELECT_ELEMENT_3:
|
||||
case SELECT_ELEMENT_4:
|
||||
case SELECT_ELEMENT_5:
|
||||
case SELECT_ELEMENT_6:
|
||||
case SELECT_ELEMENT_7:
|
||||
case SELECT_ELEMENT_8:
|
||||
case SELECT_ELEMENT_9:
|
||||
case SELECT_ELEMENT_10:
|
||||
{
|
||||
unsigned int index = action - SELECT_ELEMENT_1;
|
||||
if ( index < state->filtered_lines ) {
|
||||
state->selected_line = state->line_map[index];
|
||||
state->retv = MENU_OK;
|
||||
state->quit = TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CUSTOM_1:
|
||||
case CUSTOM_2:
|
||||
case CUSTOM_3:
|
||||
|
|
Loading…
Reference in a new issue