diff --git a/docs/userguide b/docs/userguide index 5c24dbf2..557f7d76 100644 --- a/docs/userguide +++ b/docs/userguide @@ -434,6 +434,31 @@ new_window new_window 1pixel --------------------- +=== Arbitrary commands for specific windows (for_window) + +With the +for_window+ command, you can let i3 execute any command when it +encounters a specific window. This can be used to set windows to floating or to +change their border style, for example. + +*Syntax*: +----------------------------- +for_window [criteria] command +----------------------------- + +*Examples*: +------------------------------------------------ +# enable floating mode for all XTerm windows +for_window [class="XTerm"] mode floating + +# Make all urxvts use a 1-pixel border: +for_window [class="urxvt"] border 1pixel + +# A less useful, but rather funny example: +# makes the window floating as soon as I change +# directory to ~/work +for_window [title="x200: ~/work"] mode floating +------------------------------------------------ + === Variables As you learned in the section about keyboard bindings, you will have