mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
rcxml: amend default keybinds
A-F2 to cycle view A-F3 to launch dmenu_run
This commit is contained in:
parent
fb6f7d42a5
commit
92f6afdf65
2 changed files with 11 additions and 5 deletions
|
|
@ -105,6 +105,7 @@ If no rc.xml file is found, the following default values will be used:
|
|||
|
||||
- Alt+Escape: Exit labwc
|
||||
- Alt+Tab: Cycle windows
|
||||
- Alt+F2: Cycle windows (if running on X11 and alt-tab bind already exists)
|
||||
- Alt+F3: Launch dmenu
|
||||
|
||||
# SEE ALSO
|
||||
|
|
|
|||
|
|
@ -219,14 +219,17 @@ static void rcxml_init()
|
|||
LIBXML_TEST_VERSION
|
||||
}
|
||||
|
||||
static void bind(const char *binding, const char *action)
|
||||
static void bind(const char *binding, const char *action, const char *command)
|
||||
{
|
||||
if (!binding || !action)
|
||||
return;
|
||||
struct keybind *k = keybind_create(binding);
|
||||
if (k)
|
||||
if (!k)
|
||||
return;
|
||||
if (action)
|
||||
k->action = strdup(action);
|
||||
info("binding %s: %s", binding, action);
|
||||
if (command)
|
||||
k->command = strdup(command);
|
||||
}
|
||||
|
||||
static void set_title_height(void)
|
||||
|
|
@ -241,8 +244,10 @@ static void post_processing(void)
|
|||
{
|
||||
if (!wl_list_length(&rc.keybinds)) {
|
||||
info("loading default key bindings");
|
||||
bind("A-Escape", "Exit");
|
||||
bind("A-Tab", "NextWindow");
|
||||
bind("A-Escape", "Exit", NULL);
|
||||
bind("A-Tab", "NextWindow", NULL);
|
||||
bind("A-F2", "NextWindow", NULL);
|
||||
bind("A-F3", "Execute", "dmenu_run");
|
||||
}
|
||||
|
||||
if (!rc.theme_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue