whatisgithub

What is strokemouse?

licoy/strokemouse — explained in plain English

Analysis updated 2026-05-18

108SwiftAudience · generalComplexity · 3/5LicenseSetup · moderate

In one sentence

A macOS menu bar app that lets you draw custom mouse gestures to trigger shortcuts, apps, window actions, or scripts.

Mindmap

mindmap
  root((StrokeMouse))
    What it does
      Custom mouse gestures
      Trigger key drawing
      Per app scoping
    Tech stack
      Swift
      SwiftUI
      CGEventTap
    Use cases
      Window management
      App launching
      Shell and AppleScript automation
    Audience
      Mac power users
      Developers
    Setup
      Accessibility permission
      XcodeGen build
      Menu bar app

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Draw a mouse gesture while holding right click to trigger a keyboard shortcut or open an app.

USE CASE 2

Set up different gestures that only apply inside a specific application.

USE CASE 3

Bind a gesture to a shell command or AppleScript to automate a repeated task.

USE CASE 4

Export your gesture library as a JSON file to back it up or share it with another Mac.

What is it built with?

SwiftSwiftUIXcodeGen

How does it compare?

licoy/strokemousejohn-rocky/coreai-model-zooeyrefree/vscam
Stars108112102
LanguageSwiftSwiftSwift
Last pushed2019-09-28
MaintenanceDormant
Setup difficultymoderatehardmoderate
Complexity3/53/5
Audiencegeneraldeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires granting macOS Accessibility permission, and optionally Automation permission for AppleScript based gestures.

You can use and modify the software freely, but if you run a modified version as a network service, you must also release your changes, under the AGPL 3.0 license.

So what is it?

StrokeMouse is a macOS tool for creating custom mouse gestures. You hold down a trigger button, right click by default though middle click or a side button can be used instead, and drag the mouse in a shape. Once the shape matches a gesture you have defined, StrokeMouse runs whatever action you assigned to it, such as pressing a keyboard shortcut, opening an app, moving or resizing a window, sending a media key, or running a shell command or AppleScript. Gestures can apply everywhere on your Mac or only inside specific apps, and each gesture can have its own trigger button and its own target app or window. The app lives quietly in the menu bar, where its icon changes color depending on whether it is running normally, paused, or missing a needed permission. Your full set of gestures can be exported and imported as a JSON file, so a personal setup can be backed up or shared, and gestures can also be edited by hand in that file if needed. Because it needs to watch mouse movement everywhere on the system and inject keyboard shortcuts, StrokeMouse requires the macOS Accessibility permission, and optionally the Automation permission if a gesture uses AppleScript to control another app. The app includes a guided setup to help grant these permissions the first time you run it, and it will not pretend to be listening if permission has not been granted. To build it from source, you need macOS 14 Sonoma or later and Xcode 16 or newer, plus the XcodeGen tool installed through Homebrew to generate the Xcode project. The project includes scripts for generating the project file, building a debug or release version, and packaging signed releases as zip, tar.gz, and DMG files. It is built with Swift and SwiftUI, uses Apple's CGEventTap API to watch mouse events globally, and includes Sparkle for in app update checks. The project is released under the GNU Affero General Public License version 3. Since it can run shell commands and AppleScript with system level reach, the author notes that you should only add scripts and gestures you trust, and takes no responsibility for misuse or accidental actions.

Copy-paste prompts

Prompt 1
Help me build StrokeMouse from source using XcodeGen and the provided build.sh script.
Prompt 2
Walk me through granting StrokeMouse Accessibility permission so its gesture engine can run.
Prompt 3
Show me how to create a new gesture that opens Safari when I draw an up then right shape.
Prompt 4
Explain how to export and import my gesture configuration as a JSON file for backup.
Prompt 5
Help me write an AppleScript action for a StrokeMouse gesture that locks my screen.

Frequently asked questions

What is strokemouse?

A macOS menu bar app that lets you draw custom mouse gestures to trigger shortcuts, apps, window actions, or scripts.

What language is strokemouse written in?

Mainly Swift. The stack also includes Swift, SwiftUI, XcodeGen.

What license does strokemouse use?

You can use and modify the software freely, but if you run a modified version as a network service, you must also release your changes, under the AGPL 3.0 license.

How hard is strokemouse to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is strokemouse for?

Mainly general.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.