From b77ab98ebc34ef6be00af52dba378abbebb42d6e Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 31 Jul 2011 23:38:08 +0200 Subject: [PATCH] docs/userguide: document for_window (Thanks aksr) --- docs/userguide | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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