|
NAMEsimplestroke —
detect mouse gestures
SYNOPSIS
DESCRIPTIONsimplestroke detects mouse gestures. There are twelve
pre-defined mouse gestures you can choose from.
With no arguments
GESTURESThe following gestures are supported. The names are derived from the direction you would draw them in.ARROW GESTURESArrowUp ^ ArrowDown v ArrowLeft < ArrowRight > STRAIGHT LINE GESTURESTopDown | (start at top) DownTop | LeftRight - (left to right) RightLeft - (right to left) DIAGONAL GESTURESTopLeftDown \ (start at top) TopRightDown / (start at top) DownLeftTop \ DownRightTop / Z GESTURESLeftZ RightZ SQUARE GESTURESSquareLeft ("clockwise" square) SquareRight ("counterclockwise" square) EXAMPLESThe following examples assume that simplestroke.sh is the shell script you callsimplestroke from:
#!/bin/sh case $(simplestroke) in ArrowUp) ;; ArrowDown) ;; ArrowLeft) ;; ArrowRight) ;; TopDown) ;; DownTop) ;; LeftRight) ;; RightLeft) ;; TopLeftDown) ;; TopRightDown) ;; DownLeftTop) ;; DownRightTop) ;; LeftZ) ;; RightZ) ;; SquareLeft) ;; SquareRight) ;; *) exit 1 esac To start detection under i3 while holding down the 9th mouse button add this to your ~/.config/i3/config: bindsym --whole-window button9 exec simplestroke.sh The right mouse button can be determined via xev(1). For Sway add this to your ~/.config/sway/config: bindsym --whole-window BTN_EXTRA exec simplestroke.sh The right BTN_* values can be determined via libinput-debug-events(1). Hold the mouse button and after you are finished drawing your gesture, release it. AUTHORSTobias Kortkamp <tobik@FreeBSD.org>
Visit the GSP FreeBSD Man Page Interface. |