Disallow renaming workspaces to reserved namespace
Patch status: needinfo
Patch by Alexander Berntsen
To apply this patch, use:
curl http://cr.i3wm.org/patch/517/raw.patch | git am
b/src/commands.c
13 |
@@ -1867,6 +1867,11 @@ void cmd_scratchpad_show(I3_CMD) { |
14 |
* |
15 |
*/ |
16 |
void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name) { |
17 |
+ if (strncasecmp(new_name, "__", strlen("__")) == 0) { |
18 |
+ LOG("You cannot switch to the i3 internal workspaces.\n"); |
19 |
+ ysuccess(false); |
20 |
+ return; |
21 |
+ } |
22 |
if (old_name) { |
23 |
LOG("Renaming workspace \"%s\" to \"%s\"\n", old_name, new_name); |
24 |
} else { |