]> git.sur5r.net Git - i3/i3.github.io/blobdiff - docs/4.0/userguide.html
fix identation and typos
[i3/i3.github.io] / docs / 4.0 / userguide.html
index 85e77eb2a4dc3fb1905d358b69fd1002d99b58c0..4403ffa405b40c201cd756424584c67e721aa9ed 100644 (file)
@@ -212,7 +212,7 @@ are not managed by i3, but by you. Using this mode violates the tiling
 paradigm but can be useful for some corner cases like "Save as" dialog\r
 windows, or toolbar windows (GIMP or similar). Those windows usually set the\r
 appropriate hint and are opened in floating mode by default.</p></div>\r
-<div class="paragraph"><p>You can enable floating mode for a window by pressing <tt>mod+Shift+Space</tt>. By\r
+<div class="paragraph"><p>You can toggle floating mode for a window by pressing <tt>mod+Shift+Space</tt>. By\r
 dragging the window’s titlebar with your mouse you can move the window\r
 around. By grabbing the borders and moving them you can resize the window. You\r
 can also do that by using the <a href="#floating_modifier">[floating_modifier]</a>.</p></div>\r
@@ -487,7 +487,7 @@ start.</p></div>
 <div class="paragraph"><p><strong>Syntax</strong>:</p></div>\r
 <div class="listingblock">\r
 <div class="content">\r
-<pre><tt>new_window &lt;normal|1pixel|borderless&gt;</tt></pre>\r
+<pre><tt>new_window &lt;normal|1pixel|none&gt;</tt></pre>\r
 </div></div>\r
 <div class="paragraph"><p><strong>Example</strong>:</p></div>\r
 <div class="listingblock">\r
@@ -519,6 +519,7 @@ for_window [class="urxvt"] border 1pixel
 # directory to ~/work\r
 for_window [title="x200: ~/work"] floating enable</tt></pre>\r
 </div></div>\r
+<div class="paragraph"><p>The valid criteria are the same as those for commands, see <a href="#command_criteria">[command_criteria]</a>.</p></div>\r
 </div>\r
 <div class="sect2">\r
 <h3 id="_variables">4.9. Variables</h3>\r
@@ -782,6 +783,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" id="command_criteria"><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
@@ -903,6 +984,10 @@ number or name of the workspace. To move containers to specific workspaces, use
 <tt>workspace next</tt> and <tt>workspace prev</tt>, which is handy, for example, if you have\r
 workspace 1, 3, 4 and 9 and you want to cycle through them with a single key\r
 combination.</p></div>\r
+<div class="paragraph"><p>To move a container to another xrandr output such as <tt>LVDS1</tt> or <tt>VGA1</tt>, you can\r
+use the <tt>move output</tt> command followed by the name of the target output. You\r
+may also use <tt>left</tt>, <tt>right</tt>, <tt>up</tt>, <tt>down</tt> instead of the xrandr output name to\r
+move to the the next output in the specified direction.</p></div>\r
 <div class="paragraph"><p><strong>Examples</strong>:</p></div>\r
 <div class="listingblock">\r
 <div class="content">\r
@@ -942,7 +1027,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 +1061,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