]> git.sur5r.net Git - i3/i3/blobdiff - docs/userguide
userguide: Un-hide a TODO block completed in 2011
[i3/i3] / docs / userguide
index 9c601e8869167da2385665ba66a1d57e782393f6..073ffdf1a8eb97e26d69833bf2ec35d0f3930566 100644 (file)
@@ -245,9 +245,11 @@ you open a new terminal, it will open below the current one.
 
 So, how can you open a new terminal window to the *right* of the current one?
 The solution is to use +focus parent+, which will focus the +Parent Container+ of
-the current +Container+. In this case, you would focus the +Vertical Split
-Container+ which is *inside* the horizontally oriented workspace. Thus, now new
-windows will be opened to the right of the +Vertical Split Container+:
+the current +Container+. In default configuration, use +$mod+a+ to navigate one 
++Container+ up the tree (you can repeat this multiple times until you get to the
++Workspace Container+). In this case, you would focus the +Vertical Split Container+
+which is *inside* the horizontally oriented workspace. Thus, now new windows will be
+opened to the right of the +Vertical Split Container+:
 
 image::tree-shot3.png["shot3",title="Focus parent, then open new terminal"]
 
@@ -585,6 +587,16 @@ workspace_layout default|stacking|tabbed
 workspace_layout tabbed
 ---------------------
 
+=== Window title alignment
+
+This option determines the window title's text alignment.
+Default is +left+
+
+*Syntax*:
+---------------------------------------------
+title_align left|center|right
+---------------------------------------------
+
 === Default border style for new windows
 
 This option determines which border style new windows will have. The default is
@@ -755,14 +767,23 @@ set_from_resource $black i3wm.color0 #000000
 
 To automatically make a specific window show up on a specific workspace, you
 can use an *assignment*. You can match windows by using any criteria,
-see <<command_criteria>>. It is recommended that you match on window classes
-(and instances, when appropriate) instead of window titles whenever possible
-because some applications first create their window, and then worry about
-setting the correct title. Firefox with Vimperator comes to mind. The window
-starts up being named Firefox, and only when Vimperator is loaded does the
-title change. As i3 will get the title as soon as the application maps the
-window (mapping means actually displaying it on the screen), you’d need to have
-to match on 'Firefox' in this case.
+see <<command_criteria>>. The difference between +assign+ and
++for_window <criteria> move to workspace+ is that the former will only be
+executed when the application maps the window (mapping means actually displaying
+it on the screen) but the latter will be executed whenever a window changes its
+properties to something that matches the specified criteria.
+
+Thus, it is recommended that you match on window classes (and instances, when
+appropriate) instead of window titles whenever possible because some
+applications first create their window, and then worry about setting the correct
+title. Firefox with Vimperator comes to mind. The window starts up being named
+Firefox, and only when Vimperator is loaded does the title change. As i3 will
+get the title as soon as the application maps the window, you’d need to have to
+match on 'Firefox' in this case.
+Another known issue is with Spotify, which doesn't set the class hints when
+mapping the window, meaning you'll have to use a +for_window+ rule to assign
+Spotify to a specific workspace.
+Finally, using +assign [tiling]+ and +assign [floating]+ is not supported.
 
 You can also assign a window to show up on a specific output. You can use RandR
 names such as +VGA1+ or names relative to the output with the currently focused
@@ -795,7 +816,8 @@ assign [class="^URxvt$"] → work
 # Assign to the workspace with number 2, regardless of name
 assign [class="^URxvt$"] → number 2
 
-# You can also specify a number + name. If the workspace with number 2 exists, assign will skip the text part.
+# You can also specify a number + name. If the workspace with number 2 exists,
+# assign will skip the text part.
 assign [class="^URxvt$"] → number "2: work"
 
 # Start urxvt -name irssi
@@ -995,7 +1017,7 @@ ipc-socket ~/.i3/i3-ipc.sock
 ----------------------------
 
 You can then use the +i3-msg+ application to perform any command listed in
-the next section.
+<<list_of_commands>>.
 
 === Focus follows mouse
 
@@ -1606,14 +1628,16 @@ buttons. This is useful if you want to have a named workspace that stays in
 order on the bar according to its number without displaying the number prefix.
 
 When +strip_workspace_numbers+ is set to +yes+, any workspace that has a name of
-the form "[n]:[NAME]" will display only the name. You could use this, for
+the form "[n][:][NAME]" will display only the name. You could use this, for
 instance, to display Roman numerals rather than digits by naming your
 workspaces to "1:I", "2:II", "3:III", "4:IV", ...
 
 When +strip_workspace_name+ is set to +yes+, any workspace that has a name of
-the form "[n]:[NAME]" will display only the number.
+the form "[n][:][NAME]" will display only the number.
 
-The default is to display the full name within the workspace button.
+The default is to display the full name within the workspace button. Be aware
+that the colon in the workspace name is optional, so `[n][NAME]` will also 
+have the the workspace name and number stripped correctly. 
 
 *Syntax*:
 ------------------------------
@@ -1716,6 +1740,7 @@ bar {
 }
 --------------------------------------
 
+[[list_of_commands]]
 == List of commands
 
 Commands are what you bind to specific keypresses. You can also issue commands
@@ -2083,8 +2108,7 @@ using one of the following methods:
 +mark+:: A container with the specified mark, see <<vim_like_marks>>.
 
 Note that swapping does not work with all containers. Most notably, swapping
-floating containers or containers that have a parent-child relationship to one
-another does not work.
+containers that have a parent-child relationship to one another does not work.
 
 *Syntax*:
 ----------------------------------------
@@ -2404,6 +2428,21 @@ mark [--add|--replace] [--toggle] <identifier>
 unmark <identifier>
 ----------------------------------------------
 
+You can use +i3-input+ to prompt for a mark name, then use the +mark+
+and +focus+ commands to create and jump to custom marks:
+
+*Examples*:
+---------------------------------------
+# read 1 character and mark the current window with this character
+bindsym $mod+m exec i3-input -F 'mark %s' -l 1 -P 'Mark: '
+
+# read 1 character and go to the window with the character
+bindsym $mod+g exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Goto: '
+---------------------------------------
+
+Alternatively, if you do not want to mess with +i3-input+, you could create
+separate bindings for a specific set of labels and then only use those labels:
+
 *Example (in a terminal)*:
 ---------------------------------------------------------
 # marks the focused container
@@ -2419,21 +2458,6 @@ unmark irssi
 [class="(?i)firefox"] unmark
 ---------------------------------------------------------
 
-///////////////////////////////////////////////////////////////////
-TODO: make i3-input replace %s
-*Examples*:
----------------------------------------
-# Read 1 character and mark the current window with this character
-bindsym $mod+m exec i3-input -F 'mark %s' -l 1 -P 'Mark: '
-
-# Read 1 character and go to the window with the character
-bindsym $mod+g exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Goto: '
----------------------------------------
-
-Alternatively, if you do not want to mess with +i3-input+, you could create
-separate bindings for a specific set of labels and then only use those labels.
-///////////////////////////////////////////////////////////////////
-
 [[pango_markup]]
 === Window title format
 
@@ -2818,3 +2842,20 @@ and you are in multi-monitor mode (see <<multi_monitor>>).
 Because i3 is not a compositing window manager, there is no ability to
 display a window on two screens at the same time. Instead, your presentation
 software needs to do this job (that is, open a window on each screen).
+
+[[hidpi]]
+=== High-resolution displays (aka HIDPI displays)
+
+See https://wiki.archlinux.org/index.php/HiDPI for details on how to enable
+scaling in various parts of the Linux desktop. i3 will read the desired DPI from
+the `Xft.dpi` property. The property defaults to 96 DPI, so to achieve 200%
+scaling, you’d set `Xft.dpi: 192` in `~/.Xresources`.
+
+If you are a long-time i3 user who just got a new monitor, double-check that:
+
+* You are using a scalable font (starting with “pango:”) in your i3 config.
+
+* You are using a terminal emulator which supports scaling. You could
+  temporarily switch to gnome-terminal, which is known to support scaling out of
+  the box, until you figure out how to adjust the font size in your favorite
+  terminal emulator.