*
*/
void cmd_move_con_to_workspace_name(I3_CMD, char *name) {
- if (strncasecmp(name, "__i3_", strlen("__i3_")) == 0) {
+ if (strncasecmp(name, "__", strlen("__")) == 0) {
LOG("You cannot switch to the i3 internal workspaces.\n");
ysuccess(false);
return;
*
*/
void cmd_workspace_name(I3_CMD, char *name) {
- if (strncasecmp(name, "__i3_", strlen("__i3_")) == 0) {
+ if (strncasecmp(name, "__", strlen("__")) == 0) {
LOG("You cannot switch to the i3 internal workspaces.\n");
ysuccess(false);
return;
*
*/
void cmd_rename_workspace(I3_CMD, char *old_name, char *new_name) {
+ if (strncasecmp(new_name, "__", strlen("__")) == 0) {
+ LOG("You cannot switch to the i3 internal workspaces.\n");
+ ysuccess(false);
+ return;
+ }
if (old_name) {
LOG("Renaming workspace \"%s\" to \"%s\"\n", old_name, new_name);
} else {
continue;
if (*target == '"')
target++;
+ if (strncasecmp(target, "__", strlen("__")) == 0) {
+ LOG("Cannot create workspace. '__' is a reserved prefix.\n");
+ continue;
+ }
FREE(ws->name);
ws->name = strdup(target);
if (ws->name[strlen(ws->name)-1] == '"')