GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SIMPLESTROKE(1) FreeBSD General Commands Manual SIMPLESTROKE(1)

simplestroke
detect mouse gestures

simplestroke

simplestroke detects mouse gestures. There are twelve pre-defined mouse gestures you can choose from.

With no arguments simplestroke starts in gesture detection mode. Draw your gesture and then confirm by clicking any mouse button.

simplestroke reacts on the release of mouse buttons. This makes it possible to start simplestroke from your window manager while pressing down a mouse button and start gesture analysis after releasing it.

simplestroke prints the name of the detected gesture, if any. The output can then be used in a simple shell script to execute commands.

The following gestures are supported. The names are derived from the direction you would draw them in.

ArrowUp		^
ArrowDown	v
ArrowLeft	<
ArrowRight	>

TopDown 	| (start at top)
DownTop		|
LeftRight	- (left to right)
RightLeft	- (right to left)

TopLeftDown	\ (start at top)
TopRightDown	/ (start at top)
DownLeftTop	\
DownRightTop	/

LeftZ
RightZ

SquareLeft	("clockwise" square)
SquareRight	("counterclockwise" square)

The following examples assume that simplestroke.sh is the shell script you call simplestroke 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.

Tobias Kortkamp <tobik@FreeBSD.org>

simplestroke is inspired and based on easystroke 0.6.0 written by Thomas Jaeger ⟨https://github.com/thjaeger/easystroke⟩.

April 18, 2020 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.