1 unstable release
Uses new Rust 2024
| 0.1.0 | May 18, 2025 |
|---|
#201 in #tool
7KB
101 lines
Dock Launcher
A Rust utility for launching macOS Dock applications using keyboard shortcuts. Press the right Command key (⌘) followed by a designated key (Q, W, E, etc.) to open apps pinned to your macOS Dock.
Features
Launches Dock apps with Right Command + [Q, W, E, R, T, A, S, D, F, G] shortcuts. Reads macOS Dock configuration to identify pinned apps. Lightweight and efficient, using system-level event grabbing.
Installation
Prerequisites
Rust (latest stable version) macOS (for Dock integration)
Build from Source
Clone the repository:git clone https://github.com/jul-good/snap2.git
cd snap2
Build and install:
cargo build --release
cargo install --path .
Install via Cargo (after publishing)
cargo install snap2
Usage
- Run the program:
snap2
- Press and hold the Right Command (⌘) key, then press one of the following keys to launch the corresponding Dock app (based on Dock position, left to right):
Q: 1st appW: 2nd appE: 3rd appR: 4th appT: 5th appA: 6th appS: 7th appD: 8th appF: 9th appG: 10th app
- Release the Right Command key to resume normal keyboard behavior.
Example
If your Dock has Safari as the first app and Terminal as the second:
Right Command + Q opens Safari.
Right Command + W opens Terminal.
Configuration
No additional configuration is needed. The program reads your macOS Dock's current app order dynamically.
Troubleshooting
- "Unable to handle shortcut" error: Ensure the key pressed (Q, W, etc.) corresponds to a valid Dock app position.
- Program doesn't start: Verify you have the required macOS permissions for keyboard event grabbing (e.g., Accessibility permissions).
Dependencies
~3.5–5.5MB
~97K SLoC