Skip to main content

Focus macOS apps with keyboard shortcuts.

Project description

flick

flick - switch apps with keyboard shortcuts

Is Emacs the only app you use? Is it the only app installed on your Mac? Of course it is.

But if you're one of those few lost souls who instead use multiple apps, plural? Who don't use Emacs to call their mothers and change flat tires?

flick is for you.

flick example screenshot

flick switches macOS apps with global keyboard shortcuts. It makes switching apps really fast.

Press key. Focus app. That's it.

The cursor is also, optionally, warped to the center of the newly focused window. Reduces mouse travel. Handy. (pun intended)

Flicks wraps pyobjc. It's fast - sub 70ms per flick.

Installation

pip install flick

Requires macOS and Python3.

How to use it

Once installed, run the command flick. You can background it with:

flick &

Then click 🎯 in the macOS menu bar to create shortcuts.

To add a flick shortcut, click Add App Shortcut. Then enter the name of the app, like emacs. App names are case insensitive.

Add all your commonly used apps and voila: switch apps 10x faster.

How it works

flick listens for global keyboard shortcuts. When a keyboard shortcut fires, flick:

  1. Finds the app that matches the app name string. Eg: chrome for Google Chrome, emacs Emacs (😉), slack for Slack, etc. App names are case-insensitive substrings; emacs matches Emacs, emacs, emacs-29, etc.

  2. Picks the most recently used window. If the app has multiple windows, the window used most recently is focused. flick continuously tracks when windows are focused after startup with macOS's Accessibility API. If flick was just started and is thus without a history of focused windows, the app's main window is focused by default.

  3. Centers the cursor in the (x,y) center of the focused window. That way you move the mouse less. You lazy bones.

Permissions

flick uses the macOS Accessibility API and requires permission on first run. To otherwise grant flick its needed permissions, go to System Settings → Privacy & Security → Accessibility and enable the terminal (or whatever parent app) you used to run flick.

Usage

flick              # start the daemon
flick -h           # show help
flick --version    # show version

Configuration

flick saves your configuration in:

~/.config/flick/shortcuts.json

Changes are autosaved to this file.

Development

For local development:

  • Check out this repo.
  • Modify flick.py.
  • Run flick.py.
  • Have fun.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flick-0.1.4.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flick-0.1.4-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file flick-0.1.4.tar.gz.

File metadata

  • Download URL: flick-0.1.4.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for flick-0.1.4.tar.gz
Algorithm Hash digest
SHA256 992e2de991a24fc85c88d0aab178caecadcb3c5e96db7e3bc3fdfa1c3ed78f07
MD5 57606ab24f64321be87937614ff15e6e
BLAKE2b-256 3c63790fcf143856e1bbd618b4322df2d46b4e0c17a4de6c04554a3ab6958827

See more details on using hashes here.

File details

Details for the file flick-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: flick-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for flick-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 81ab5199a5ee687b733c53b04c824d25aecb3f5574c18e8a6fda594e9078c85d
MD5 d298fdd77e46bc557ce15be1d8b7570c
BLAKE2b-256 b103bb2e735466b130a7548a42a80821f56fee0d70a1ebe4d3df4d242da26131

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page