X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=docs%2Fuserguide;h=e21553815601c5bebd60c5793c22595afd6863f5;hb=05fb9096362e788f032de6eccea2d7fea03317ab;hp=0c1130c3088ed7e0668378f19c0e35cbcc062324;hpb=9940571069336e9b9a60dc2f95ea3a329a3c7c5e;p=i3%2Fi3 diff --git a/docs/userguide b/docs/userguide index 0c1130c3..e2155381 100644 --- a/docs/userguide +++ b/docs/userguide @@ -564,6 +564,8 @@ hide_edge_borders vertical === Arbitrary commands for specific windows (for_window) +[[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. @@ -1076,6 +1078,20 @@ show_marks yes|no show_marks yes -------------- +[[line_continuation]] + +=== Line continuation + +Config files support line continuation, meaning when you end a line in a +backslash character (`\`), the line-break will be ignored by the parser. This +feature can be used to create more readable configuration files. + +*Examples*: +------------------- +bindsym Mod1+f \ +fullscreen toggle +------------------- + == Configuring i3bar The bar at the bottom of your monitor is drawn by a separate process called @@ -1137,7 +1153,10 @@ right hand side of the bar. This is useful to display system information like your current IP address, battery status or date/time. The specified command will be passed to +sh -c+, so you can use globbing and -have to have correct quoting etc. +have to have correct quoting etc. Note that for signal handling, depending on +your shell (users of dash(1) are known to be affected), you have to use the +shell’s exec command so that signals are passed to your program, not to the +shell. *Syntax*: ------------------------ @@ -1148,6 +1167,9 @@ status_command ------------------------------------------------- bar { status_command i3status --config ~/.i3status.conf + + # For dash(1) users who want signal handling to work: + status_command exec ~/.bin/my_status_command } ------------------------------------------------- @@ -1203,23 +1225,41 @@ Available modifiers are Mod1-Mod5, Shift, Control (see +xmodmap(1)+). === Mouse button commands Specifies a command to run when a button was pressed on i3bar to override the -default behavior. Currently only the mouse wheel buttons are supported. This is -useful for disabling the scroll wheel action or running scripts that implement -custom behavior for these buttons. +default behavior. This is useful, e.g., for disabling the scroll wheel action +or running scripts that implement custom behavior for these buttons. + +A button is always named +button+, where 1 to 5 are default buttons as follows and higher +numbers can be special buttons on devices offering more buttons: + +button1:: + Left mouse button. +button2:: + Middle mouse button. +button3:: + Right mouse button. +button4:: + Scroll wheel up. +button5:: + Scroll wheel down. + +Please note that the old +wheel_up_cmd+ and +wheel_down_cmd+ commands are deprecated +and will be removed in a future release. We strongly recommend using the more general ++bindsym+ with +button4+ and +button5+ instead. *Syntax*: ---------------------- -wheel_up_cmd -wheel_down_cmd ---------------------- +---------------------------- +bindsym button +---------------------------- *Example*: ---------------------- +--------------------------------------------------------- bar { - wheel_up_cmd nop - wheel_down_cmd exec ~/.i3/scripts/custom_wheel_down + # disable clicking on workspace buttons + bindsym button1 nop + # execute custom script when scrolling downwards + bindsym button5 exec ~/.i3/scripts/custom_wheel_down } ---------------------- +--------------------------------------------------------- === Bar ID @@ -1314,7 +1354,9 @@ bar { } # show tray icons on the primary monitor -tray_output primary +bar { + tray_output primary +} # show tray icons on the big monitor bar { @@ -1327,6 +1369,23 @@ Note that you might not have a primary output configured yet. To do so, run: xrandr --output --primary ------------------------- +=== Tray padding + +The tray is shown on the right-hand side of the bar. By default, a padding of 2 +pixels is used for the upper, lower and right-hand side of the tray area and +between the individual icons. + +*Syntax*: +------------------------- +tray_padding [px] +------------------------- + +*Example*: +------------------------- +# Obey Fitts's law +tray_padding 0 +------------------------- + === Font Specifies the font to be used in the bar. See <>. @@ -1554,14 +1613,16 @@ urgent:: Compares the urgent state of the window. Can be "latest" or "oldest". Matches the latest or oldest urgent window, respectively. (The following aliases are also available: newest, last, recent, first) +workspace:: + Compares the workspace name of the workspace the window belongs to. con_mark:: Compares the mark set for this container, see <>. con_id:: Compares the i3-internal container ID, which you can get via the IPC interface. Handy for scripting. -The criteria +class+, +instance+, +role+, +title+ and +mark+ are actually -regular expressions (PCRE). See +pcresyntax(3)+ or +perldoc perlre+ for +The criteria +class+, +instance+, +role+, +title+, +workspace+ and +mark+ are +actually regular expressions (PCRE). See +pcresyntax(3)+ or +perldoc perlre+ for information on how to use them. [[exec]] @@ -2042,6 +2103,37 @@ Alternatively, if you do not want to mess with +i3-input+, you could create seperate bindings for a specific set of labels and then only use those labels. /////////////////////////////////////////////////////////////////// +=== Window title format + +By default, i3 will simply print the X11 window title. Using +title_format+, +this can be customized by setting the format to the desired output. This +directive supports +https://developer.gnome.org/pango/stable/PangoMarkupFormat.html[Pango markup] +and the following placeholders which will be replaced: + ++%title+:: + The X11 window title (_NET_WM_NAME or WM_NAME as fallback). + +Using the <> directive, you can set the title format for any window +based on <>. + +*Syntax*: +--------------------- +title_format +--------------------- + +*Examples*: +------------------------------------------------------------------------------------- +# give the focused window a prefix +bindsym $mod+p title_format "Important | %title" + +# print all window titles bold +for_window [class=".*"] title_format "%title" + +# print window titles of firefox windows red +for_window [class="(?i)firefox"] title_format "%title" +------------------------------------------------------------------------------------- + === Changing border style To change the border of the current client, you can use +border normal+ to use the normal