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 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:
-
Finds the app that matches the app name string. Eg:
chromefor Google Chrome,emacsEmacs (😉),slackfor Slack, etc. App names are case-insensitive substrings;emacsmatchesEmacs,emacs,emacs-29, etc. -
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.
-
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.
Metadata
Release files for flick 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flick-0.2.1.tar.gz | 18.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flick-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 38.9 kB
Release files / flick-0.2.1.tar.gz
| Download URL | flick-0.2.1.tar.gz |
|---|---|
| Size | 18.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57e99d2c9407ed2f32be6afc8549f87c7ea2cd50e3811ddf38d573c02c7a6a82
|
|
BLAKE2b-256 checksum How to use checksums |
f21e5bcd2fdc8d9abb6420a4793cb93dc083c92dbe90171c87555af7bee2a99d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.0
|
Release files / flick-0.2.1-py3-none-any.whl
| Download URL | flick-0.2.1-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae2a2076ffafc0eb460474e91747c09832e124f6a91054f75d40ee4013ec842e
|
|
BLAKE2b-256 checksum How to use checksums |
c6d8e4ddff0a29cf7a8a3d185619e590bb47d20a2e23d004ec33a9de2881b6fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.0
|