userguide: Mention know issues for assign (#3434)
Fixes #3222 Fixes #3293 Related to #2060
This commit is contained in:
parent
5720ba65ab
commit
18dbfe699a
|
@ -755,14 +755,23 @@ set_from_resource $black i3wm.color0 #000000
|
||||||
|
|
||||||
To automatically make a specific window show up on a specific workspace, you
|
To automatically make a specific window show up on a specific workspace, you
|
||||||
can use an *assignment*. You can match windows by using any criteria,
|
can use an *assignment*. You can match windows by using any criteria,
|
||||||
see <<command_criteria>>. It is recommended that you match on window classes
|
see <<command_criteria>>. The difference between +assign+ and
|
||||||
(and instances, when appropriate) instead of window titles whenever possible
|
+for_window <criteria> move to workspace+ is that the former will only be
|
||||||
because some applications first create their window, and then worry about
|
executed when the application maps the window (mapping means actually displaying
|
||||||
setting the correct title. Firefox with Vimperator comes to mind. The window
|
it on the screen) but the latter will be executed whenever a window changes its
|
||||||
starts up being named Firefox, and only when Vimperator is loaded does the
|
properties to something that matches the specified criteria.
|
||||||
title change. As i3 will get the title as soon as the application maps the
|
|
||||||
window (mapping means actually displaying it on the screen), you’d need to have
|
Thus, it is recommended that you match on window classes (and instances, when
|
||||||
to match on 'Firefox' in this case.
|
appropriate) instead of window titles whenever possible because some
|
||||||
|
applications first create their window, and then worry about setting the correct
|
||||||
|
title. Firefox with Vimperator comes to mind. The window starts up being named
|
||||||
|
Firefox, and only when Vimperator is loaded does the title change. As i3 will
|
||||||
|
get the title as soon as the application maps the window, you’d need to have to
|
||||||
|
match on 'Firefox' in this case.
|
||||||
|
Another known issue is with Spotify, which doesn't set the class hints when
|
||||||
|
mapping the window, meaning you'll have to use a +for_window+ rule to assign
|
||||||
|
Spotify to a specific workspace.
|
||||||
|
Finally, using +assign [tiling]+ and +assign [floating]+ is not supported.
|
||||||
|
|
||||||
You can also assign a window to show up on a specific output. You can use RandR
|
You can also assign a window to show up on a specific output. You can use RandR
|
||||||
names such as +VGA1+ or names relative to the output with the currently focused
|
names such as +VGA1+ or names relative to the output with the currently focused
|
||||||
|
|
|
@ -406,6 +406,11 @@ CFGFUN(assign_output, const char *output) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (current_match->window_mode != WM_ANY) {
|
||||||
|
ELOG("Assignments using window mode (floating/tiling) is not supported\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
DLOG("New assignment, using above criteria, to output \"%s\".\n", output);
|
DLOG("New assignment, using above criteria, to output \"%s\".\n", output);
|
||||||
Assignment *assignment = scalloc(1, sizeof(Assignment));
|
Assignment *assignment = scalloc(1, sizeof(Assignment));
|
||||||
match_copy(&(assignment->match), current_match);
|
match_copy(&(assignment->match), current_match);
|
||||||
|
@ -420,6 +425,11 @@ CFGFUN(assign, const char *workspace, bool is_number) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (current_match->window_mode != WM_ANY) {
|
||||||
|
ELOG("Assignments using window mode (floating/tiling) is not supported\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_number && ws_name_to_number(workspace) == -1) {
|
if (is_number && ws_name_to_number(workspace) == -1) {
|
||||||
ELOG("Could not parse initial part of \"%s\" as a number.\n", workspace);
|
ELOG("Could not parse initial part of \"%s\" as a number.\n", workspace);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue