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.scd108
1 files changed, 94 insertions, 14 deletions
diff --git a/sway/sway.5.scd b/sway/sway.5.scd
index 2780370f..9f823947 100644
--- a/sway/sway.5.scd
+++ b/sway/sway.5.scd
@@ -216,15 +216,14 @@ set|plus|minus|toggle <amount>
216 further details. 216 further details.
217 217
218*move* left|right|up|down [<px> px] 218*move* left|right|up|down [<px> px]
219 Moves the focused container in the direction specified. If the container, 219 Moves the focused container in the direction specified. The optional _px_
220 the optional _px_ argument specifies how many pixels to move the container. 220 argument specifies how many pixels to move the container. If unspecified,
221 If unspecified, the default is 10 pixels. Pixels are ignored when moving 221 the default is 10 pixels. Pixels are ignored when moving tiled containers.
222 tiled containers.
223 222
224*move* [absolute] position <pos_x> [px|ppt] <pos_y> [px|ppt] 223*move* [absolute] position <pos_x> [px|ppt] <pos_y> [px|ppt]
225 Moves the focused container to the specified position in the workspace. 224 Moves the focused container to the specified position in the workspace.
226 The position can be specified in pixels or percentage points, omitting 225 The position can be specified in pixels or percentage points, omitting
227 the unit defaults to pixels. If _absolute_ is used, the position is 226 the unit defaults to pixels. If _absolute_ is used, the position is
228 relative to all outputs. _absolute_ can not be used with percentage points. 227 relative to all outputs. _absolute_ can not be used with percentage points.
229 228
230*move* [absolute] position center 229*move* [absolute] position center
@@ -390,8 +389,8 @@ runtime.
390 for_window <criteria> move container to output <output> 389 for_window <criteria> move container to output <output>
391 390
392*bindsym* [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] \ 391*bindsym* [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] \
393[--to-code] [--input-device=<device>] [--no-warn] [--no-repeat] [Group<1-4>+]<key combo> \ 392[--to-code] [--input-device=<device>] [--no-warn] [--no-repeat] [--inhibited] \
394<command> 393[Group<1-4>+]<key combo> <command>
395 Binds _key combo_ to execute the sway command _command_ when pressed. You 394 Binds _key combo_ to execute the sway command _command_ when pressed. You
396 may use XKB key names here (*wev*(1) is a good tool for discovering these). 395 may use XKB key names here (*wev*(1) is a good tool for discovering these).
397 With the flag _--release_, the command is executed when the key combo is 396 With the flag _--release_, the command is executed when the key combo is
@@ -401,6 +400,12 @@ runtime.
401 only be available for that group. By default, if you overwrite a binding, 400 only be available for that group. By default, if you overwrite a binding,
402 swaynag will give you a warning. To silence this, use the _--no-warn_ flag. 401 swaynag will give you a warning. To silence this, use the _--no-warn_ flag.
403 402
403 For specifying modifier keys, you can use the XKB modifier names _Shift_,
404 _Lock_ (for Caps Lock), _Control_, _Mod1_ (for Alt), _Mod2_ (for Num Lock),
405 _Mod3_ (for XKB modifier Mod3), _Mod4_ (for the Logo key), and _Mod5_ (for
406 AltGr). In addition, you can use the aliases _Ctrl_ (for Control), _Alt_
407 (for Alt), and _Super_ (for the Logo key).
408
404 Unless the flag _--locked_ is set, the command will not be run when a 409 Unless the flag _--locked_ is set, the command will not be run when a
405 screen locking program is active. If there is a matching binding with 410 screen locking program is active. If there is a matching binding with
406 and without _--locked_, the one with will be preferred when locked and the 411 and without _--locked_, the one with will be preferred when locked and the
@@ -455,7 +460,8 @@ runtime.
455``` 460```
456 461
457 *bindcode* [--whole-window] [--border] [--exclude-titlebar] [--release] \ 462 *bindcode* [--whole-window] [--border] [--exclude-titlebar] [--release] \
458[--locked] [--input-device=<device>] [--no-warn] [Group<1-4>+]<code> <command> 463[--locked] [--input-device=<device>] [--no-warn] [--no-repeat] [--inhibited] \
464[Group<1-4>+]<code> <command>
459 is also available for binding with key/button codes instead of key/button names. 465 is also available for binding with key/button codes instead of key/button names.
460 466
461*bindswitch* [--locked] [--no-warn] [--reload] <switch>:<state> <command> 467*bindswitch* [--locked] [--no-warn] [--reload] <switch>:<state> <command>
@@ -488,6 +494,62 @@ runtime.
488 bindswitch lid:toggle exec echo "Lid moved" 494 bindswitch lid:toggle exec echo "Lid moved"
489``` 495```
490 496
497*bindgesture* [--exact] [--input-device=<device>] [--no-warn] \
498<gesture>[:<fingers>][:directions] <command>
499 Binds _gesture_ to execute the sway command _command_ when detected.
500 Currently supports the _hold_, _pinch_ or _swipe_ gesture. Optionally
501 can be limited to bind to a certain number of _fingers_ or, for a
502 _pinch_ or _swipe_ gesture, to certain _directions_.
503
504[[ *type*
505:[ *fingers*
506:< *direction*
507| hold
508:- 1 - 5
509: none
510| swipe
511: 3 - 5
512: up, down, left, right
513| pinch
514: 2 - 5
515: all above + inward, outward, clockwise, counterclockwise
516
517 The _fingers_ can be limited to any sensible number or left empty to accept
518 any finger counts.
519 Valid directions are _up_, _down_, _left_ and _right_, as well as _inward_,
520 _outward_, _clockwise_, _counterclockwise_ for the _pinch_ gesture.
521 Multiple directions can be combined by a plus.
522
523 If a _input-device_ is given, the binding will only be executed for
524 that input device and will be executed instead of any binding that is
525 generic to all devices. By default, if you overwrite a binding,
526 swaynag will give you a warning. To silence this, use the _--no-warn_ flag.
527
528 The _--exact_ flag can be used to ensure a binding only matches when exactly
529 all specified directions are matched and nothing more. If there is matching
530 binding with _--exact_, it will be preferred.
531
532 The priority for matching bindings is as follows: input device, then
533 exact matches followed by matches with the highest number of matching
534 directions.
535
536 Gestures executed while the pointer is above a bar are not handled by sway.
537 See the respective documentation, e.g. *bindgesture* in *sway-bar*(5).
538
539 Example:
540```
541 # Allow switching between workspaces with left and right swipes
542 bindgesture swipe:right workspace prev
543 bindgesture swipe:left workspace next
544
545 # Allow container movements by pinching them
546 bindgesture pinch:inward+up move up
547 bindgesture pinch:inward+down move down
548 bindgesture pinch:inward+left move left
549 bindgesture pinch:inward+right move right
550
551```
552
491*client.background* <color> 553*client.background* <color>
492 This command is ignored and is only present for i3 compatibility. 554 This command is ignored and is only present for i3 compatibility.
493 555
@@ -593,7 +655,8 @@ The default colors are:
593 655
594 656
595*default_border* normal|none|pixel [<n>] 657*default_border* normal|none|pixel [<n>]
596 Set default border style for new tiled windows. 658 Set default border style for new tiled windows. Config reload won't affect
659 existing windows, only newly created ones after the reload.
597 660
598*default_floating_border* normal|none|pixel [<n>] 661*default_floating_border* normal|none|pixel [<n>]
599 Set default border style for new floating windows. This only applies to 662 Set default border style for new floating windows. This only applies to
@@ -752,6 +815,10 @@ The default colors are:
752 dialog will not be rendered. If _leave_fullscreen_, the view will exit 815 dialog will not be rendered. If _leave_fullscreen_, the view will exit
753 fullscreen mode and the dialog will be rendered. 816 fullscreen mode and the dialog will be rendered.
754 817
818*primary_selection* enabled|disabled
819 Enable or disable the primary selection clipboard. May only be configured
820 at launch. Default is _enabled_.
821
755*set* $<name> <value> 822*set* $<name> <value>
756 Sets variable $_name_ to _value_. You can use the new variable in the 823 Sets variable $_name_ to _value_. You can use the new variable in the
757 arguments of future commands. When the variable is used, it can be escaped 824 arguments of future commands. When the variable is used, it can be escaped
@@ -792,6 +859,11 @@ The default colors are:
792*unbindswitch* <switch>:<state> 859*unbindswitch* <switch>:<state>
793 Removes a binding for when <switch> changes to <state>. 860 Removes a binding for when <switch> changes to <state>.
794 861
862*unbindgesture* [--exact] [--input-device=<device>] \
863<gesture>[:<fingers>][:directions]
864 Removes a binding for the specified _gesture_, _fingers_
865 and _directions_ combination.
866
795*unbindsym* [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] \ 867*unbindsym* [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] \
796[--to-code] [--input-device=<device>] <key combo> 868[--to-code] [--input-device=<device>] <key combo>
797 Removes the binding for _key combo_ that was previously bound with the 869 Removes the binding for _key combo_ that was previously bound with the
@@ -897,6 +969,9 @@ properties in practice for your applications.
897 969
898The following attributes may be matched with: 970The following attributes may be matched with:
899 971
972*all*
973 Matches all windows.
974
900*app_id* 975*app_id*
901 Compare value against the app id. Can be a regular expression. If value is 976 Compare value against the app id. Can be a regular expression. If value is
902 \_\_focused\_\_, then the app id must be the same as that of the currently 977 \_\_focused\_\_, then the app id must be the same as that of the currently
@@ -905,7 +980,8 @@ The following attributes may be matched with:
905*class* 980*class*
906 Compare value against the window class. Can be a regular expression. If 981 Compare value against the window class. Can be a regular expression. If
907 value is \_\_focused\_\_, then the window class must be the same as that of 982 value is \_\_focused\_\_, then the window class must be the same as that of
908 the currently focused window. _class_ are specific to X11 applications. 983 the currently focused window. _class_ are specific to X11 applications and
984 require XWayland.
909 985
910*con_id* 986*con_id*
911 Compare against the internal container ID, which you can find via IPC. If 987 Compare against the internal container ID, which you can find via IPC. If
@@ -919,12 +995,14 @@ The following attributes may be matched with:
919 Matches floating windows. 995 Matches floating windows.
920 996
921*id* 997*id*
922 Compare value against the X11 window ID. Must be numeric. 998 Compare value against the X11 window ID. Must be numeric. id is specific to
999 X11 applications and requires XWayland.
923 1000
924*instance* 1001*instance*
925 Compare value against the window instance. Can be a regular expression. If 1002 Compare value against the window instance. Can be a regular expression. If
926 value is \_\_focused\_\_, then the window instance must be the same as that 1003 value is \_\_focused\_\_, then the window instance must be the same as that
927 of the currently focused window. 1004 of the currently focused window. instance is specific to X11 applications and
1005 requires XWayland.
928 1006
929*pid* 1007*pid*
930 Compare value against the window's process ID. Must be numeric. 1008 Compare value against the window's process ID. Must be numeric.
@@ -949,12 +1027,14 @@ The following attributes may be matched with:
949*window_role* 1027*window_role*
950 Compare against the window role (WM_WINDOW_ROLE). Can be a regular 1028 Compare against the window role (WM_WINDOW_ROLE). Can be a regular
951 expression. If value is \_\_focused\_\_, then the window role must be the 1029 expression. If value is \_\_focused\_\_, then the window role must be the
952 same as that of the currently focused window. 1030 same as that of the currently focused window. window_role is specific to X11
1031 applications and requires XWayland.
953 1032
954*window_type* 1033*window_type*
955 Compare against the window type (\_NET_WM_WINDOW_TYPE). Possible values 1034 Compare against the window type (\_NET_WM_WINDOW_TYPE). Possible values
956 are normal, dialog, utility, toolbar, splash, menu, dropdown_menu, 1035 are normal, dialog, utility, toolbar, splash, menu, dropdown_menu,
957 popup_menu, tooltip and notification. 1036 popup_menu, tooltip and notification. window_type is specific to X11
1037 applications and requires XWayland.
958 1038
959*workspace* 1039*workspace*
960 Compare against the workspace name for this view. Can be a regular 1040 Compare against the workspace name for this view. Can be a regular