]> git.sur5r.net Git - i3/i3/blobdiff - docs/userguide
Merge pull request #2004 from Airblader/bug-2003
[i3/i3] / docs / userguide
index 62010587a501b064dd2c9dd835521479fe01b5f0..c98c25f9d98039772c4e92c53ff1d0a518cc3d5c 100644 (file)
@@ -604,12 +604,16 @@ The valid criteria are the same as those for commands, see <<command_criteria>>.
 [[no_focus]]
 
 When a new window appears, it will be focused. The +no_focus+ directive allows preventing
-this from happening and can be used in combination with <<command_criteria>>.
+this from happening and must be used in combination with <<command_criteria>>.
 
 Note that this does not apply to all cases, e.g., when feeding data into a running application
 causing it to request being focused. To configure the behavior in such cases, refer to
 <<focus_on_window_activation>>.
 
++no_focus+ will also be ignored for the first window on a workspace as there shouldn't be
+a reason to not focus the window in this case. This allows for better usability in
+combination with +workspace_layout+.
+
 *Syntax*:
 -------------------
 no_focus <criteria>
@@ -1011,31 +1015,6 @@ force_display_urgency_hint <timeout> ms
 force_display_urgency_hint 500 ms
 ---------------------------------
 
-=== Delaying exiting on zero displays
-
-Outputs may disappear momentarily and come back later. For example,
-using a docking station that does not announce the undock (e.g. ACPI Undock 
-event triggered through manually pushing a button before actually ejecting 
-the notebook). During the removal of the notebook from the docking station,
-all outputs disappear momentarily.
-
-To prevent i3 from exiting when no output is available momentarily, you can 
-tell i3 to delay a certain time first and check available outputs again using 
-the +delay_exit_on_zero_displays+ directive. Setting the value to 0 disables 
-this feature.
-
-The default is 500ms.
-
-*Syntax*:
-----------------------------------------
-delay_exit_on_zero_displays <timeout> ms
-----------------------------------------
-
-*Example*:
-----------------------------------
-delay_exit_on_zero_displays 500 ms
-----------------------------------
-
 === Focus on window activation
 
 [[focus_on_window_activation]]
@@ -1834,6 +1813,27 @@ bindsym $mod+c move absolute position center
 bindsym $mod+m move position mouse
 -------------------------------------------------------
 
+=== Sticky floating windows
+
+If you want a window to stick to the glass, i.e., have it stay on screen even
+if you switch to another workspace, you can use the +sticky+ command. For
+example, this can be useful for notepads, a media player or a video chat
+window.
+
+Note that while any window can be made sticky through this command, it will
+only take effect if the window is floating.
+
+*Syntax*:
+----------------------------
+sticky enable|disable|toggle
+----------------------------
+
+*Examples*:
+------------------------------------------------------
+# make a terminal sticky that was started as a notepad
+for_window [instance=notepad] sticky enable
+------------------------------------------------------
+
 === Changing (named) workspaces/moving to workspaces
 
 To change to a specific workspace, use the +workspace+ command, followed by the
@@ -1849,6 +1849,10 @@ container to workspace next+, +move container to workspace prev+ to move a
 container to the next/previous workspace and +move container to workspace current+
 (the last one makes sense only when used with criteria).
 
++workspace next+ cycles through either numbered or named workspaces. But when it
+reaches the last numbered/named workspace, it looks for named workspaces after
+exhausting numbered ones and looks for numbered ones after exhausting named ones.
+
 See <<move_to_outputs>> for how to move a container/workspace to a different
 RandR output.
 
@@ -2007,6 +2011,7 @@ If you want to resize containers/windows using your keyboard, you can use the
 *Syntax*:
 -------------------------------------------------------
 resize grow|shrink <direction> [<px> px [or <ppt> ppt]]
+resize set <width> [px] <height> [px]
 -------------------------------------------------------
 
 Direction can either be one of +up+, +down+, +left+ or +right+. Or you can be
@@ -2015,7 +2020,8 @@ space from all the other containers. The optional pixel argument specifies by
 how many pixels a *floating container* should be grown or shrunk (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 shrunk (the
-default is 10 percentage points).
+default is 10 percentage points). Note that +resize set+ will only work for
+floating containers.
 
 I recommend using the resize command inside a so called +mode+:
 
@@ -2048,6 +2054,11 @@ mode "resize" {
 bindsym $mod+r mode "resize"
 ----------------------------------------------------------------------
 
+*Example 2 - setting urxvt size to 640x480:*
+------------------------------------------------
+for_window [class="urxvt"] resize set 640 480
+------------------------------------------------
+
 === Jumping to specific windows
 
 Often when in a multi-monitor environment, you want to quickly jump to a
@@ -2131,10 +2142,10 @@ and the following placeholders which will be replaced:
 
 +%title+::
     The X11 window title (_NET_WM_NAME or WM_NAME as fallback).
-+%class+:
++%class+::
     The X11 window class (second part of WM_CLASS). This corresponds to the
     +class+ criterion, see <<command_criteria>>.
-+%instance+:
++%instance+::
     The X11 window instance (first part of WM_CLASS). This corresponds to the
     +instance+ criterion, see <<command_criteria>>.