aboutsummaryrefslogtreecommitdiffstats
path: root/sway/sway.5.scd
diff options
context:
space:
mode:
Diffstat (limited to 'sway/sway.5.scd')
-rw-r--r--sway/sway.5.scd90
1 files changed, 55 insertions, 35 deletions
diff --git a/sway/sway.5.scd b/sway/sway.5.scd
index 927bf55c..3202d517 100644
--- a/sway/sway.5.scd
+++ b/sway/sway.5.scd
@@ -19,6 +19,24 @@ bindsym Shift+XF86AudioRaiseVolume exec \\
19 pactl set-sink-volume @DEFAULT_SINK@ -1% 19 pactl set-sink-volume @DEFAULT_SINK@ -1%
20``` 20```
21 21
22Commands can also be given as a block in the form *command { <subcommands...>
23}*. Anything before the opening *{* will be prepended to the lines inside the
24block. For example:
25
26```
27output eDP-1 {
28 background ~/wallpaper.png
29 resolution 1920x1080
30}
31```
32
33is identical to
34
35```
36output eDP-1 background ~/wallpaper.png
37output eDP-1 resolution 1920x1080
38```
39
22These commands can be executed in your config file, via *swaymsg*(1), or via 40These commands can be executed in your config file, via *swaymsg*(1), or via
23the bindsym command. 41the bindsym command.
24 42
@@ -37,10 +55,8 @@ which you may only select one. *[...]* is used for optional arguments, and
37 55
38The following commands may only be used in the configuration file. 56The following commands may only be used in the configuration file.
39 57
40*bar {* <commands...> *}* 58*bar* [<bar-id>] <bar-subcommands...>
41 _commands..._ after *{* will be interpreted as bar commands. For 59 For details on bar subcommands, see *sway-bar*(5).
42 details, see *sway-bar*(5). A newline is required between *{* and the
43 first command, and *}* must be alone on a line.
44 60
45*default\_orientation* horizontal|vertical|auto 61*default\_orientation* horizontal|vertical|auto
46 Sets the default container layout for tiled containers. 62 Sets the default container layout for tiled containers.
@@ -51,10 +67,6 @@ The following commands may only be used in the configuration file.
51 *wordexp*(3) for details). The same include file can only be included once; 67 *wordexp*(3) for details). The same include file can only be included once;
52 subsequent attempts will be ignored. 68 subsequent attempts will be ignored.
53 69
54*set* $<name> <value>
55 Sets variable $_name_ to _value_. You can use the new variable in the
56 arguments of future commands.
57
58*swaybg\_command* <command> 70*swaybg\_command* <command>
59 Executes custom background _command_. Default is _swaybg_. Refer to 71 Executes custom background _command_. Default is _swaybg_. Refer to
60 *output* below for more information. 72 *output* below for more information.
@@ -407,37 +419,30 @@ The default colors are:
407 inner gap is nonzero. When _off_, gaps will only be added between views. 419 inner gap is nonzero. When _off_, gaps will only be added between views.
408 _toggle_ cannot be used in the configuration file. 420 _toggle_ cannot be used in the configuration file.
409 421
410*gaps* <amount>
411 Sets _amount_ pixels of gap between windows and around each workspace.
412
413*gaps* inner|outer <amount> 422*gaps* inner|outer <amount>
414 Sets default _amount_ pixels of _inner_ or _outer_ gap, where the former 423 Sets default _amount_ pixels of _inner_ or _outer_ gap, where the inner
415 affects spacing between views and the latter affects the space around each 424 affects spacing around each view and outer affects the spacing around each
416 workspace. 425 workspace. Outer gaps are in addition to inner gaps.
417 426
418*gaps* inner|outer all|workspace|current set|plus|minus <amount> 427 This affects new workspaces only, and is used when the workspace doesn't
419 Changes the gaps for the _inner_ or _outer_ gap. _all_ changes the gaps for 428 have its own gaps settings (see: workspace <ws> gaps inner|outer <amount>).
420 all views or workspace, _workspace_ changes gaps for all views in current
421 workspace (or current workspace), and _current_ changes gaps for the current
422 view or workspace.
423 429
424*hide\_edge\_borders* none|vertical|horizontal|both|smart 430*gaps* inner|outer all|current set|plus|minus <amount>
431 Changes the _inner_ or _outer_ gaps for either _all_ workspaces or the
432 _current_ workspace.
433
434*hide\_edge\_borders* none|vertical|horizontal|both|smart|smart\_no\_gaps
425 Hides window borders adjacent to the screen edges. Default is _none_. 435 Hides window borders adjacent to the screen edges. Default is _none_.
426 436
427*input* <input\_device> *{* <commands...> *}* 437*input* <input\_device> <input-subcommands...>
428 _commands..._ after *{* will be interpreted as input commands applying to 438 For details on input subcommands, see *sway-input*(5).
429 the specified input device. For details, see *sway-input*(5). A newline is
430 required between *{* and the first command, and *}* must be alone on a
431 line.
432 439
433 \* may be used in lieu of a specific device name to configure all input 440 \* may be used in lieu of a specific device name to configure all input
434 devices. A list of input device names may be obtained via *swaymsg -t 441 devices. A list of input device names may be obtained via *swaymsg -t
435 get\_inputs*. 442 get\_inputs*.
436 443
437*seat* <seat> *{* <commands...> *}* 444*seat* <seat> <seat-subcommands...>
438 _commands..._ after *{* will be interpreted as seat commands applying to 445 For details on seat subcommands, see *sway-input*(5).
439 the specified seat. For details, see *sway-input*(5). A newline is required
440 between *{* and the first command, and *}* must be alone on a line.
441 446
442*seat* <seat> cursor move|set <x> <y> 447*seat* <seat> cursor move|set <x> <y>
443 Move specified seat's cursor relative to current position or wrap to 448 Move specified seat's cursor relative to current position or wrap to
@@ -451,6 +456,12 @@ The default colors are:
451*kill* 456*kill*
452 Kills (closes) the currently focused container and all of its children. 457 Kills (closes) the currently focused container and all of its children.
453 458
459*smart\_borders* on|no\_gaps|off
460 If smart\_borders are _on_, borders will only be enabled if the workspace
461 only has one visible child (identical to _hide\_edge\_borders_ smart). If
462 smart\_borders is set to _no\_gaps_, borders will only be enabled if the
463 workspace only has one visible child and gaps greater than zero.
464
454*smart\_gaps* on|off 465*smart\_gaps* on|off
455 If smart\_gaps are _on_ gaps will only be enabled if a workspace has more 466 If smart\_gaps are _on_ gaps will only be enabled if a workspace has more
456 than one child. 467 than one child.
@@ -465,10 +476,8 @@ The default colors are:
465*mode* <mode> 476*mode* <mode>
466 Switches to the specified mode. The default mode _default_. 477 Switches to the specified mode. The default mode _default_.
467 478
468*mode* [--pango\_markup] <mode> *{* <commands...> *}* 479*mode* [--pango\_markup] <mode> <mode-subcommands...>
469 _commands..._ after *{* will be added to the specified mode. A newline is 480 The only two valid _mode-subcommands..._ are *bindsym* and *bindcode*.
470 required between *{* and the first command, and *}* must be alone on a
471 line. Only *bindsym* and *bindcode* commands are permitted in mode blocks.
472 If _--pango\_markup_ is given, then _mode_ will be interpreted as pango 481 If _--pango\_markup_ is given, then _mode_ will be interpreted as pango
473 markup. 482 markup.
474 483
@@ -533,8 +542,15 @@ You may combine output commands into one, like so:
533 output HDMI-A-1 mode 1920x1080 pos 1920,0 bg ~/wallpaper.png stretch 542 output HDMI-A-1 mode 1920x1080 pos 1920,0 bg ~/wallpaper.png stretch
534 543
535You can get a list of output names with *swaymsg -t get\_outputs*. You may also 544You can get a list of output names with *swaymsg -t get\_outputs*. You may also
536match any output by using the output name "\*". Be sure to add this output 545match any output by using the output name "\*".
537config after the others, or it will be matched instead of the others. 546
547*set* $<name> <value>
548 Sets variable $_name_ to _value_. You can use the new variable in the
549 arguments of future commands. When the variable is used, it can be escaped
550 with an additional $ (ie $$_name_) to have the replacement happen at run
551 time instead of when reading the config. However, it does not always make
552 sense for the variable to be replaced at run time since some arguments do
553 need to be known at config time.
538 554
539*show\_marks* yes|no 555*show\_marks* yes|no
540 If *show\_marks* is yes, marks will be displayed in the window borders. 556 If *show\_marks* is yes, marks will be displayed in the window borders.
@@ -568,6 +584,10 @@ config after the others, or it will be matched instead of the others.
568*workspace* back_and_forth 584*workspace* back_and_forth
569 Switches to the previously focused workspace. 585 Switches to the previously focused workspace.
570 586
587*workspace* <name> gaps inner|outer <amount>
588 Specifies that workspace _name_ should have the given gaps settings when it
589 is created.
590
571*workspace* <name> output <output> 591*workspace* <name> output <output>
572 Specifies that workspace _name_ should be shown on the specified _output_. 592 Specifies that workspace _name_ should be shown on the specified _output_.
573 593