"un-bindsym" or "bindsym" for mode "default"
I was trying to use the function keys as application launchers, but then realized some of the software I use (htop
, alsamixer
) require them.
After realizing that there isn't an un-bindsym command, I tried using bindsym in mode default like so:
mode "default" { bindsym F1 exec my-browser bindsym F2 exec i3-sensible-terminal bindsym F3 mode "curses" bindsym F12 exec my-backlight-menu }
This cause i3 to exit. Looking through the source, there was a specific check for this, that after removing let my configuration work fine without any problems.
I'm wondering if this check is necessary? Or is there another way of implementing my configuration without modifying i3?
Patch
diff --git a/src/config_directives.c b/src/config_directives.c
index e45db0e..8191fb5 100644
--- a/src/config_directives.c
+++ b/src/config_directives.c
@@ -186,10 +186,6 @@ CFGFUN(mode_binding, const char *bindtype, const char *modifiers, const char *ke
}
CFGFUN(enter_mode, const char *modename) {
- if (strcasecmp(modename, DEFAULT_BINDING_MODE) == 0) {
- ELOG("You cannot use the name %s for your mode\n", DEFAULT_BINDING_MODE);
- exit(1);
- }
DLOG("\t now in mode %s\n", modename);
FREE(current_mode);
current_mode = sstrdup(modename);