Time Lord technology: for_window config directive to run arbitrary cmds
An example to set all XTerms floating: for_window [class="XTerm"] mode floating To make all urxvts use a 1-pixel border: for_window [class="urxvt"] border 1pixel A less useful, but rather funny example: for_window [title="x200: ~/work"] mode floating The commands are not completely arbitrary. The commands above were tested, others may need some fixing. Internally, windows are compared against your criteria (class, title, …) when they are initially managed and whenever one of the relevant values change. Then, the specified command is run *once* (per window). It gets prefixed with a criteria to make it match only the specific window that triggered it. So, if you configure "mode floating", i3 runs something like '[id="8393923"] mode floating'.
This commit is contained in:
@ -541,7 +541,7 @@ static int handle_windowname_change(void *data, xcb_connection_t *conn, uint8_t
|
||||
if ((con = con_by_window_id(window)) == NULL || con->window == NULL)
|
||||
return 1;
|
||||
|
||||
window_update_name(con->window, prop);
|
||||
window_update_name(con->window, prop, false);
|
||||
|
||||
x_push_changes(croot);
|
||||
|
||||
@ -559,7 +559,7 @@ static int handle_windowname_change_legacy(void *data, xcb_connection_t *conn, u
|
||||
if ((con = con_by_window_id(window)) == NULL || con->window == NULL)
|
||||
return 1;
|
||||
|
||||
window_update_name_legacy(con->window, prop);
|
||||
window_update_name_legacy(con->window, prop, false);
|
||||
|
||||
x_push_changes(croot);
|
||||
|
||||
@ -576,7 +576,7 @@ static int handle_windowclass_change(void *data, xcb_connection_t *conn, uint8_t
|
||||
if ((con = con_by_window_id(window)) == NULL || con->window == NULL)
|
||||
return 1;
|
||||
|
||||
window_update_class(con->window, prop);
|
||||
window_update_class(con->window, prop, false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user