aboutsummaryrefslogtreecommitdiffstats
path: root/sway/sway.5.scd
diff options
context:
space:
mode:
authorLibravatar Florian Franzen <Florian.Franzen@gmail.com>2022-04-23 10:27:47 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2022-05-30 12:20:43 +0200
commitcab2189aa64d04ba79dc2cbf19400435b47cdbd2 (patch)
tree450ac51fbc75c73ed1dc6728bc05b08366ace785 /sway/sway.5.scd
parentAdd a Hindi (हिन्दी) translation to the README (diff)
downloadsway-cab2189aa64d04ba79dc2cbf19400435b47cdbd2.tar.gz
sway-cab2189aa64d04ba79dc2cbf19400435b47cdbd2.tar.zst
sway-cab2189aa64d04ba79dc2cbf19400435b47cdbd2.zip
sway: add bindgesture command
Co-authored-by: Michael Weiser <michael.weiser@gmx.de>
Diffstat (limited to 'sway/sway.5.scd')
-rw-r--r--sway/sway.5.scd61
1 files changed, 61 insertions, 0 deletions
diff --git a/sway/sway.5.scd b/sway/sway.5.scd
index 2780370f..db7886f0 100644
--- a/sway/sway.5.scd
+++ b/sway/sway.5.scd
@@ -488,6 +488,62 @@ runtime.
488 bindswitch lid:toggle exec echo "Lid moved" 488 bindswitch lid:toggle exec echo "Lid moved"
489``` 489```
490 490
491*bindgesture* [--exact] [--input-device=<device>] [--no-warn] \
492<gesture>[:<fingers>][:directions] <command>
493 Binds _gesture_ to execute the sway command _command_ when detected.
494 Currently supports the _hold_, _pinch_ or _swipe_ gesture. Optionally
495 can be limited to bind to a certain number of _fingers_ or, for a
496 _pinch_ or _swipe_ gesture, to certain _directions_.
497
498[[ *type*
499:[ *fingers*
500:< *direction*
501| hold
502:- 1 - 5
503: none
504| swipe
505: 3 - 5
506: up, down, left, right
507| pinch
508: 2 - 5
509: all above + inward, outward, clockwise, counterclockwise
510
511 The _fingers_ can be limited to any sensible number or left empty to accept
512 any finger counts.
513 Valid directions are _up_, _down_, _left_ and _right_, as well as _inward_,
514 _outward_, _clockwise_, _counterclockwise_ for the _pinch_ gesture.
515 Multiple directions can be combined by a plus.
516
517 If a _input-device_ is given, the binding will only be executed for
518 that input device and will be executed instead of any binding that is
519 generic to all devices. By default, if you overwrite a binding,
520 swaynag will give you a warning. To silence this, use the _--no-warn_ flag.
521
522 The _--exact_ flag can be used to ensure a binding only matches when exactly
523 all specified directions are matched and nothing more. If there is matching
524 binding with _--exact_, it will be preferred.
525
526 The priority for matching bindings is as follows: input device, then
527 exact matches followed by matches with the highest number of matching
528 directions.
529
530 Gestures executed while the pointer is above a bar are not handled by sway.
531 See the respective documentation, e.g. *bindgesture* in *sway-bar*(5).
532
533 Example:
534```
535 # Allow switching between workspaces with left and right swipes
536 bindgesture swipe:right workspace prev
537 bindgesture swipe:left workspace next
538
539 # Allow container movements by pinching them
540 bindgesture pinch:inward+up move up
541 bindgesture pinch:inward+down move down
542 bindgesture pinch:inward+left move left
543 bindgesture pinch:inward+right move right
544
545```
546
491*client.background* <color> 547*client.background* <color>
492 This command is ignored and is only present for i3 compatibility. 548 This command is ignored and is only present for i3 compatibility.
493 549
@@ -792,6 +848,11 @@ The default colors are:
792*unbindswitch* <switch>:<state> 848*unbindswitch* <switch>:<state>
793 Removes a binding for when <switch> changes to <state>. 849 Removes a binding for when <switch> changes to <state>.
794 850
851*unbindgesture* [--exact] [--input-device=<device>] \
852<gesture>[:<fingers>][:directions]
853 Removes a binding for the specified _gesture_, _fingers_
854 and _directions_ combination.
855
795*unbindsym* [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] \ 856*unbindsym* [--whole-window] [--border] [--exclude-titlebar] [--release] [--locked] \
796[--to-code] [--input-device=<device>] <key combo> 857[--to-code] [--input-device=<device>] <key combo>
797 Removes the binding for _key combo_ that was previously bound with the 858 Removes the binding for _key combo_ that was previously bound with the