]> git.sur5r.net Git - i3/i3.github.io/commitdiff
update docs/userguide
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 28 Aug 2011 16:03:46 +0000 (18:03 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 28 Aug 2011 16:03:46 +0000 (18:03 +0200)
_docs/userguide
docs/4.0/userguide.html
docs/userguide.html

index 6971c9edf89d3170ea9c9225803551f0f64f8a3f..50c8b2617d893d03c9e803a3771ddb35c6572e63 100644 (file)
@@ -690,6 +690,54 @@ force_focus_wrapping yes
 
 == List of commands
 
+Commands are what you bind to specific keypresses. You can also issue commands
+at runtime without pressing a key by using the IPC interface. An easy way to
+do this is to use the +i3-msg+ utility:
+
+*Example*:
+--------------------------
+# execute this on your shell to make the current container borderless
+i3-msg border none
+--------------------------
+
+Commands can be chained by using +;+ (a semicolon). So, to move a window to a
+specific workspace and immediately switch to that workspace, you can configure
+the following keybinding:
+
+*Example*:
+-------------------------------------------
+bindsym mod+x move workspace 3; workspace 3
+-------------------------------------------
+
+Furthermore, you can change the scope of a command, that is, which containers
+should be affected by that command, by using various criteria. These are
+prefixed in square brackets to every command. If you want to kill all windows
+which have the class Firefox, use:
+
+*Example*:
+------------------------------------
+bindsym mod+x [class="Firefox"] kill
+------------------------------------
+
+The criteria which are currently implemented are:
+
+class::
+       Compares the window class (the second part of WM_CLASS)
+instance::
+       Compares the window instance (the first part of WM_CLASS)
+id::
+       Compares the X11 window ID, which you can get via +xwininfo+ for example.
+title::
+       Compares the X11 window title (_NET_WM_NAME or WM_NAME as fallback).
+mark::
+       Compares the mark set for this container, see <<vim_like_marks>>.
+con_id::
+       Compares the i3-internal container ID, which you can get via the IPC
+       interface. Handy for scripting.
+
+Note that currently all criteria are compared case-insensitive and do not
+support regular expressions. This is planned to change in the future.
+
 === Splitting containers
 
 The split command makes the current window a split container. Split containers
@@ -828,7 +876,20 @@ will order them numerically.
 === Resizing containers/windows
 
 If you want to resize containers/windows using your keyboard, you can use the
-+resize+ command, I recommend using it inside a so called +mode+:
++resize+ command:
+
+*Syntax*:
+---------------------------------------------------------
+resize <grow|shrink> <direction> [<px> px] [or <ppt> ppt]
+---------------------------------------------------------
+
+Direction can be one of +up+, +down+, +left+ or +right+. The optional pixel
+argument specifies by how many pixels a *floating container* should be grown or
+shrinked (the default is 10 pixels). The ppt argument means percentage points
+and specifies by how many percentage points a *tiling container* should be
+grown or shrinked (the default is 10 percentage points).
+
+I recommend using the resize command inside a so called +mode+:
 
 .Example: Configuration file, defining a mode for resizing
 ----------------------------------------------------------------------
@@ -851,7 +912,9 @@ mode "resize" {
         bindsym semicolon resize grow right
         bindsym Shift+semicolon resize shrink right
 
-        bindcode 36 mode default
+        # back to normal: Enter or Escape
+        bindsym Return mode "default"
+        bindsym Escape mode "default"
 }
 
 # Enter resize mode
index 85e77eb2a4dc3fb1905d358b69fd1002d99b58c0..5fc25ec04b14fca78b954824d9126855ebc0cbf5 100644 (file)
@@ -782,6 +782,86 @@ will always wrap.</p></div>
 <div class="sect1">\r
 <h2 id="_list_of_commands">5. List of commands</h2>\r
 <div class="sectionbody">\r
+<div class="paragraph"><p>Commands are what you bind to specific keypresses. You can also issue commands\r
+at runtime without pressing a key by using the IPC interface. An easy way to\r
+do this is to use the <tt>i3-msg</tt> utility:</p></div>\r
+<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt># execute this on your shell to make the current container borderless\r
+i3-msg border none</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p>Commands can be chained by using <tt>;</tt> (a semicolon). So, to move a window to a\r
+specific workspace and immediately switch to that workspace, you can configure\r
+the following keybinding:</p></div>\r
+<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>bindsym mod+x move workspace 3; workspace 3</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p>Furthermore, you can change the scope of a command, that is, which containers\r
+should be affected by that command, by using various criteria. These are\r
+prefixed in square brackets to every command. If you want to kill all windows\r
+which have the class Firefox, use:</p></div>\r
+<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>bindsym mod+x [class="Firefox"] kill</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p>The criteria which are currently implemented are:</p></div>\r
+<div class="dlist"><dl>\r
+<dt class="hdlist1">\r
+class\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the window class (the second part of WM_CLASS)\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+instance\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the window instance (the first part of WM_CLASS)\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+id\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the X11 window ID, which you can get via <tt>xwininfo</tt> for example.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+title\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the X11 window title (_NET_WM_NAME or WM_NAME as fallback).\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+mark\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the mark set for this container, see <a href="#vim_like_marks">[vim_like_marks]</a>.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+con_id\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the i3-internal container ID, which you can get via the IPC\r
+        interface. Handy for scripting.\r
+</p>\r
+</dd>\r
+</dl></div>\r
+<div class="paragraph"><p>Note that currently all criteria are compared case-insensitive and do not\r
+support regular expressions. This is planned to change in the future.</p></div>\r
 <div class="sect2">\r
 <h3 id="_splitting_containers">5.1. Splitting containers</h3>\r
 <div class="paragraph"><p>The split command makes the current window a split container. Split containers\r
@@ -942,7 +1022,18 @@ will order them numerically.</p></div>
 <div class="sect2">\r
 <h3 id="resizingconfig">5.5. Resizing containers/windows</h3>\r
 <div class="paragraph"><p>If you want to resize containers/windows using your keyboard, you can use the\r
-<tt>resize</tt> command, I recommend using it inside a so called <tt>mode</tt>:</p></div>\r
+<tt>resize</tt> command:</p></div>\r
+<div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>resize &lt;grow|shrink&gt; &lt;direction&gt; [&lt;px&gt; px] [or &lt;ppt&gt; ppt]</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p>Direction can be one of <tt>up</tt>, <tt>down</tt>, <tt>left</tt> or <tt>right</tt>. The optional pixel\r
+argument specifies by how many pixels a <strong>floating container</strong> should be grown or\r
+shrinked (the default is 10 pixels). The ppt argument means percentage points\r
+and specifies by how many percentage points a <strong>tiling container</strong> should be\r
+grown or shrinked (the default is 10 percentage points).</p></div>\r
+<div class="paragraph"><p>I recommend using the resize command inside a so called <tt>mode</tt>:</p></div>\r
 <div class="listingblock">\r
 <div class="title">Example: Configuration file, defining a mode for resizing</div>\r
 <div class="content">\r
@@ -965,7 +1056,9 @@ will order them numerically.</p></div>
         bindsym semicolon resize grow right\r
         bindsym Shift+semicolon resize shrink right\r
 \r
-        bindcode 36 mode default\r
+        # back to normal: Enter or Escape\r
+        bindsym Return mode "default"\r
+        bindsym Escape mode "default"\r
 }\r
 \r
 # Enter resize mode\r
index 85e77eb2a4dc3fb1905d358b69fd1002d99b58c0..5fc25ec04b14fca78b954824d9126855ebc0cbf5 100644 (file)
@@ -782,6 +782,86 @@ will always wrap.</p></div>
 <div class="sect1">\r
 <h2 id="_list_of_commands">5. List of commands</h2>\r
 <div class="sectionbody">\r
+<div class="paragraph"><p>Commands are what you bind to specific keypresses. You can also issue commands\r
+at runtime without pressing a key by using the IPC interface. An easy way to\r
+do this is to use the <tt>i3-msg</tt> utility:</p></div>\r
+<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt># execute this on your shell to make the current container borderless\r
+i3-msg border none</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p>Commands can be chained by using <tt>;</tt> (a semicolon). So, to move a window to a\r
+specific workspace and immediately switch to that workspace, you can configure\r
+the following keybinding:</p></div>\r
+<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>bindsym mod+x move workspace 3; workspace 3</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p>Furthermore, you can change the scope of a command, that is, which containers\r
+should be affected by that command, by using various criteria. These are\r
+prefixed in square brackets to every command. If you want to kill all windows\r
+which have the class Firefox, use:</p></div>\r
+<div class="paragraph"><p><strong>Example</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>bindsym mod+x [class="Firefox"] kill</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p>The criteria which are currently implemented are:</p></div>\r
+<div class="dlist"><dl>\r
+<dt class="hdlist1">\r
+class\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the window class (the second part of WM_CLASS)\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+instance\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the window instance (the first part of WM_CLASS)\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+id\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the X11 window ID, which you can get via <tt>xwininfo</tt> for example.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+title\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the X11 window title (_NET_WM_NAME or WM_NAME as fallback).\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+mark\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the mark set for this container, see <a href="#vim_like_marks">[vim_like_marks]</a>.\r
+</p>\r
+</dd>\r
+<dt class="hdlist1">\r
+con_id\r
+</dt>\r
+<dd>\r
+<p>\r
+        Compares the i3-internal container ID, which you can get via the IPC\r
+        interface. Handy for scripting.\r
+</p>\r
+</dd>\r
+</dl></div>\r
+<div class="paragraph"><p>Note that currently all criteria are compared case-insensitive and do not\r
+support regular expressions. This is planned to change in the future.</p></div>\r
 <div class="sect2">\r
 <h3 id="_splitting_containers">5.1. Splitting containers</h3>\r
 <div class="paragraph"><p>The split command makes the current window a split container. Split containers\r
@@ -942,7 +1022,18 @@ will order them numerically.</p></div>
 <div class="sect2">\r
 <h3 id="resizingconfig">5.5. Resizing containers/windows</h3>\r
 <div class="paragraph"><p>If you want to resize containers/windows using your keyboard, you can use the\r
-<tt>resize</tt> command, I recommend using it inside a so called <tt>mode</tt>:</p></div>\r
+<tt>resize</tt> command:</p></div>\r
+<div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
+<div class="listingblock">\r
+<div class="content">\r
+<pre><tt>resize &lt;grow|shrink&gt; &lt;direction&gt; [&lt;px&gt; px] [or &lt;ppt&gt; ppt]</tt></pre>\r
+</div></div>\r
+<div class="paragraph"><p>Direction can be one of <tt>up</tt>, <tt>down</tt>, <tt>left</tt> or <tt>right</tt>. The optional pixel\r
+argument specifies by how many pixels a <strong>floating container</strong> should be grown or\r
+shrinked (the default is 10 pixels). The ppt argument means percentage points\r
+and specifies by how many percentage points a <strong>tiling container</strong> should be\r
+grown or shrinked (the default is 10 percentage points).</p></div>\r
+<div class="paragraph"><p>I recommend using the resize command inside a so called <tt>mode</tt>:</p></div>\r
 <div class="listingblock">\r
 <div class="title">Example: Configuration file, defining a mode for resizing</div>\r
 <div class="content">\r
@@ -965,7 +1056,9 @@ will order them numerically.</p></div>
         bindsym semicolon resize grow right\r
         bindsym Shift+semicolon resize shrink right\r
 \r
-        bindcode 36 mode default\r
+        # back to normal: Enter or Escape\r
+        bindsym Return mode "default"\r
+        bindsym Escape mode "default"\r
 }\r
 \r
 # Enter resize mode\r