Merge pull request #1744 from Airblader/feature-docs-7

Documentation Improvements
next
Michael Stapelberg 2015-06-13 12:39:59 +02:00
commit 34183b97fd
7 changed files with 26 additions and 57 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

View File

@ -503,17 +503,11 @@ default_orientation vertical
This option determines in which mode new containers on workspace level will
start.
///////////////////////////////
See also <<stack-limit>>.
//////////////////////////////
*Syntax*:
---------------------------------------------
workspace_layout default|stacking|tabbed
---------------------------------------------
/////////////////////////////////////////////
new_container stack-limit <cols|rows> <value>
/////////////////////////////////////////////
*Example*:
---------------------
@ -523,20 +517,20 @@ workspace_layout tabbed
=== Border style for new windows
This option determines which border style new windows will have. The default is
"normal". Note that new_float applies only to windows which are starting out as
floating windows, e.g. dialog windows.
+normal+. Note that new_float applies only to windows which are starting out as
floating windows, e.g., dialog windows, but not windows that are floated later on.
*Syntax*:
---------------------------------------------
new_window normal|1pixel|none|pixel
new_window normal|none|pixel
new_window normal|pixel <px>
new_float normal|1pixel|none|pixel
new_float normal|none|pixel
new_float normal|pixel <px>
---------------------------------------------
*Example*:
---------------------
new_window 1pixel
new_window pixel
---------------------
The "normal" and "pixel" border styles support an optional border width in
@ -585,7 +579,7 @@ for_window <criteria> <command>
for_window [class="XTerm"] floating enable
# Make all urxvts use a 1-pixel border:
for_window [class="urxvt"] border 1pixel
for_window [class="urxvt"] border pixel 1
# A less useful, but rather funny example:
# makes the window floating as soon as I change
@ -2057,49 +2051,29 @@ seperate bindings for a specific set of labels and then only use those labels.
=== Changing border style
To change the border of the current client, you can use +border normal+ to use the normal
border (including window title), +border 1pixel+ to use a 1-pixel border (no window title)
border (including window title), +border pixel 1+ to use a 1-pixel border (no window title)
and +border none+ to make the client borderless.
There is also +border toggle+ which will toggle the different border styles.
*Examples*:
----------------------------
bindsym $mod+t border normal
bindsym $mod+y border 1pixel
bindsym $mod+u border none
----------------------------
[[stack-limit]]
///////////////////////////////////////////////////////////////////////////////
TODO: not yet implemented
=== Changing the stack-limit of a container
If you have a single container with a lot of windows inside it (say, more than
10), the default layout of a stacking container can get a little unhandy.
Depending on your screens size, you might end up with only half of the title
lines being actually used, wasting a lot of screen space.
Using the +stack-limit+ command, you can limit the number of rows or columns
in a stacking container. i3 will create columns or rows (depending on what
you limited) automatically as needed.
*Syntax*:
-----------------------------
stack-limit cols|rows <value>
-----------------------------
-----------------------------------------------
border normal|pixel [<n>]
border none|toggle
# legacy syntax, equivalent to "border pixel 1"
border 1pixel
-----------------------------------------------
*Examples*:
-------------------
# I always want to have two window titles in one line
stack-limit cols 2
# Not more than 5 rows in this stacking container
stack-limit rows 5
-------------------
image:stacklimit.png[Container limited to two columns]
///////////////////////////////////////////////////////////////////////////////
----------------------------------------------
# use window title, but no border
bindsym $mod+t border normal 0
# use no window title and a thick border
bindsym $mod+y border pixel 3
# use neither window title nor border
bindsym $mod+u border none
----------------------------------------------
[[shmlog]]

View File

@ -117,7 +117,6 @@ for my $line (@lines) {
# new_container changed only the statement name to workspace_layout
if ($statement eq 'new_container') {
# TODO: new_container stack-limit
print "workspace_layout$parameters\n";
next;
}
@ -184,7 +183,6 @@ sub convert_command {
restart
reload
exit
stack-limit
);
my ($statement, $key, $command) = ($line =~ /([a-zA-Z_-]+)\s+([^\s]+)\s+(.*)/);

View File

@ -67,7 +67,7 @@ void cmd_move_con_to_workspace_number(I3_CMD, char *which);
void cmd_resize(I3_CMD, char *way, char *direction, char *resize_px, char *resize_ppt);
/**
* Implementation of 'border normal|none|1pixel|toggle'.
* Implementation of 'border normal|pixel [<n>]', 'border none|1pixel|toggle'.
*
*/
void cmd_border(I3_CMD, char *border_style_str, char *border_width);

View File

@ -77,7 +77,8 @@ state DEBUGLOG:
argument = 'toggle', 'on', 'off'
-> call cmd_debuglog($argument)
# border normal|none|1pixel|toggle|1pixel
# border normal|pixel [<n>]
# border none|1pixel|toggle
state BORDER:
border_style = 'normal', 'pixel'
-> BORDER_WIDTH

View File

@ -816,7 +816,7 @@ void cmd_resize(I3_CMD, char *way, char *direction, char *resize_px, char *resiz
}
/*
* Implementation of 'border normal|none|1pixel|toggle|pixel'.
* Implementation of 'border normal|pixel [<n>]', 'border none|1pixel|toggle'.
*
*/
void cmd_border(I3_CMD, char *border_style_str, char *border_width) {

View File

@ -147,8 +147,6 @@ $input = <<EOT;
bindsym Mod1+s restart
bindsym Mod1+s reload
bindsym Mod1+s exit
bindsym Mod1+s stack-limit cols 2
bindsym Mod1+s stack-limit rows 3
bind Mod1+c exec /usr/bin/urxvt
mode "asdf" {
bind 36 mode default
@ -161,8 +159,6 @@ ok(line_exists($output, qr|^bindsym Mod1\+s mark foo$|), 'mark unchanged');
ok(line_exists($output, qr|^bindsym Mod1\+s restart$|), 'restart unchanged');
ok(line_exists($output, qr|^bindsym Mod1\+s reload$|), 'reload unchanged');
ok(line_exists($output, qr|^bindsym Mod1\+s exit$|), 'exit unchanged');
ok(line_exists($output, qr|^bindsym Mod1\+s stack-limit cols 2$|), 'stack-limit unchanged');
ok(line_exists($output, qr|^bindsym Mod1\+s stack-limit rows 3$|), 'stack-limit unchanged');
ok(line_exists($output, qr|^bindcode Mod1\+c exec /usr/bin/urxvt$|), 'bind changed to bindcode');
ok(line_exists($output, qr|^mode "asdf" {$|), 'mode asdf unchanged');
ok(line_exists($output, qr|^bindcode 36 mode \"default\"$|), 'mode default unchanged');