actually displaying it on the screen), you’d need to have to match on Firefox
in this case.
+You can use the special workspace +~+ to specify that matching clients should
+be put into floating mode.
+
*Syntax*:
----------------------------------------------------
assign ["]window class[/window title]["] [→] workspace
assign urxvt → 2
assign "urxvt" → 2
assign "urxvt/VIM" → 3
+assign "gecko" → ~
----------------------
=== Automatically starting applications on startup
*/
struct Assignment {
char *windowclass_title;
+ /* floating is true if this was an assignment to the special workspace "~".
+ * Matching clients will be put into floating mode automatically. */
+ bool floating;
int workspace;
TAILQ_ENTRY(Assignment) assignments;
};
die("Malformed assignment, couldn't find target\n");
target++;
- if (atoi(target) < 1 || atoi(target) > 10)
+ if (*target != '~' && (atoi(target) < 1 || atoi(target) > 10))
die("Malformed assignment, invalid workspace number\n");
LOG("assignment parsed: \"%s\" to \"%s\"\n", class_title, target);
- struct Assignment *new = smalloc(sizeof(struct Assignment));
+ struct Assignment *new = scalloc(sizeof(struct Assignment));
new->windowclass_title = class_title;
- new->workspace = atoi(target);
+ if (*target == '~')
+ new->floating = true;
+ else new->workspace = atoi(target);
TAILQ_INSERT_TAIL(&assignments, new, assignments);
continue;
}
if (get_matching_client(conn, assign->windowclass_title, new) == NULL)
continue;
+ if (assign->floating) {
+ new->floating = FLOATING_AUTO_ON;
+ LOG("Assignment matches, putting client into floating mode\n");
+ break;
+ }
+
LOG("Assignment \"%s\" matches, so putting it on workspace %d\n",
assign->windowclass_title, assign->workspace);