-------------------------
mode dock|hide|invisible
hidden_state hide|show
-modifier <Modifier>
+modifier <Modifier>|none
------------------------
*Example*:
}
----------------
-Available modifiers are Mod1-Mod5, Shift, Control (see +xmodmap(1)+).
+Available modifiers are Mod1-Mod5, Shift, Control (see +xmodmap(1)+). You can
+also use "none" if you don't want any modifier to trigger this behavior.
=== Mouse button commands
if (!strcmp(cur_key, "modifier")) {
DLOG("modifier = %.*s\n", len, val);
+ if (len == 4 && !strncmp((const char *)val, "none", strlen("none"))) {
+ config.modifier = XCB_NONE;
+ return 1;
+ }
+
if (len == 5 && !strncmp((const char *)val, "shift", strlen("shift"))) {
config.modifier = ShiftMask;
return 1;
case '3':
config.modifier = Mod3Mask;
return 1;
- /*
- case '4':
- config.modifier = Mod4Mask;
- return 1;
- */
case '5':
config.modifier = Mod5Mask;
return 1;
}
}
+
config.modifier = Mod4Mask;
return 1;
}
DLOG("received an xkb event\n");
xcb_xkb_state_notify_event_t *state = (xcb_xkb_state_notify_event_t *)event;
- if (state->xkbType == XCB_XKB_STATE_NOTIFY) {
+ if (state->xkbType == XCB_XKB_STATE_NOTIFY && config.modifier != XCB_NONE) {
int modstate = state->mods & config.modifier;
#define DLOGMOD(modmask, status) \
-> call cfg_bar_id($bar_id); BAR
state BAR_MODIFIER:
- modifier = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Control', 'Ctrl', 'Shift'
+ modifier = 'Mod1', 'Mod2', 'Mod3', 'Mod4', 'Mod5', 'Control', 'Ctrl', 'Shift', 'none', 'off'
-> call cfg_bar_modifier($modifier); BAR
state BAR_WHEEL_UP_CMD:
current_bar->modifier = M_CONTROL;
else if (strcmp(modifier, "Shift") == 0)
current_bar->modifier = M_SHIFT;
+ else if (strcmp(modifier, "none") == 0 ||
+ strcmp(modifier, "off") == 0)
+ current_bar->modifier = M_NONE;
}
static void bar_configure_binding(const char *button, const char *command) {
TAILQ_INIT(&(current_bar->bar_bindings));
TAILQ_INIT(&(current_bar->tray_outputs));
current_bar->tray_padding = 2;
+ current_bar->modifier = M_MOD4;
}
CFGFUN(bar_finish) {
ystr("modifier");
switch (config->modifier) {
+ case M_NONE:
+ ystr("none");
+ break;
case M_CONTROL:
ystr("ctrl");
break;
case M_MOD3:
ystr("Mod3");
break;
- /*
- case M_MOD4:
- ystr("Mod4");
- break;
- */
case M_MOD5:
ystr("Mod5");
break;