]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/config.c
Allow "modifier none" in i3bar to disable the modifier.
[i3/i3] / i3bar / src / config.c
index bc13f3d902f321f183a0c51ae66017a8869778cd..5c23bc78647775b4bb532dfcb966054ed1279555 100644 (file)
@@ -121,6 +121,11 @@ static int config_string_cb(void *params_, const unsigned char *val, size_t _len
 
     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;
@@ -140,16 +145,12 @@ static int config_string_cb(void *params_, const unsigned char *val, size_t _len
                 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;
     }