Double-clap into your mic and your whole workspace springs to life β every app relaunched and snapped back to the exact window position, size and monitor it had when you saved it, with an optional startup sound. Everything is configured from a small local web control panel β no config files to edit.
One command β clones the repo and sets everything up:
curl -fsSL https://raw.githubusercontent.com/Forrest404/clap-to-open/main/scripts/bootstrap.sh | bashOr do it by hand:
git clone https://github.com/Forrest404/clap-to-open.git
cd clap-to-open
./scripts/install.shThe installer creates a self-contained virtualenv inside the project, installs the package, registers a systemd user service for the clap listener, and adds a Clap to Open application launcher. Itβs safe to re-run.
Heads-up: window placement uses the GNOME window-calls extension. If you donβt have it, the installer points you to it β itβs a one-click install from extensions.gnome.org.
Once it's on PyPI, the lowest-friction install is pipx:
# Windows / macOS:
pipx install clap-to-open
# Linux (GNOME): add system site-packages so it can use PyGObject for the
# monitor map and app picker:
pipx install --system-site-packages clap-to-openThen clap serve. On Linux you still need the GNOME window-calls extension
(see below); run clap doctor to check everything at once.
I didnt test it because i dont use windows. try it out but it might not work.
In PowerShell:
irm https://raw.githubusercontent.com/Forrest404/clap-to-open/main/scripts/bootstrap.ps1 | iexOr by hand:
git clone https://github.com/Forrest404/clap-to-open.git
cd clap-to-open
powershell -ExecutionPolicy Bypass -File scripts\install.ps1This creates the venv, installs the package (+ pywin32/psutil), and adds a
Start-Menu shortcut. Window placement uses the Win32 API directly (no extension
needed); the listener runs as a background pythonw process, autostart is a
Startup-folder shortcut, and the global hotkey is registered by a small agent.
Windows status: the Windows backend is authored and CI-tested for install/import, but window placement, sound, autostart and the global hotkey have not yet been exercised on a real Windows desktop β please open an issue if something misbehaves.
Not comfortable with a terminal? Paste this prompt into an AI coding agent (Claude Code, Cursor, Copilot CLI, etc.) and let it do the install for you:
Install the "Clap to Open" app from https://github.com/Forrest404/clap-to-open
on my machine. It's a Linux tool for GNOME on Wayland that lets me double-clap
to relaunch a saved window layout, configured from a local web control panel.
Please:
1. Confirm I'm on Linux running GNOME on Wayland (check $XDG_SESSION_TYPE and
$XDG_CURRENT_DESKTOP). If not, warn me β this tool targets GNOME/Wayland.
2. Make sure the GNOME "window-calls" extension is installed and enabled
(gnome-extensions list | grep window-calls). If it's missing, tell me to
install it from https://extensions.gnome.org/extension/4724/window-calls/
and enable it before continuing.
3. Run the installer:
curl -fsSL https://raw.githubusercontent.com/Forrest404/clap-to-open/main/scripts/bootstrap.sh | bash
It clones to ~/.local/share/clap-to-open, creates a venv, and registers a
systemd user service + app launcher. If it asks to install PortAudio (needed
by the mic library) or a sound player, approve that.
4. When it finishes, open the control panel by running:
~/.local/share/clap-to-open/venv/bin/clap serve
then tell me to capture my current window layout, tune the clap sensitivity,
and switch "Listening" on.
5. Report any errors and how you resolved them.
clap serve # open the control panel at http://localhost:7333(If clap isnβt on your PATH, use ./venv/bin/clap or add ./venv/bin to PATH.)
On first launch a setup wizard walks you through it: a live system check β
capture your layout β turn on listening and clap to test. That's it. (You can
re-run the checks any time with clap doctor.)
Doing it by hand instead:
- Arrange your windows exactly how you like them.
- In the panel, hit Capture current layout.
- Tune sensitivity and pick double- or triple-clap.
- Flip Listening on β now clap. ππ
- π§ First-run onboarding wizard β guided setup with a live system check.
- ποΈ Web control panel β tune everything in the browser, nothing hardcoded.
- π Listening + start-on-login toggles with a live status indicator.
- β¨οΈ Custom global shortcut β set your own hotkey to toggle listening.
- π Double or triple clap to trigger, with an adjustable cooldown.
- ποΈ Sensitivity controls β threshold, volume gate, band-pass, reset time.
- πͺ Workspace layouts β capture the current windows, test the boot, clear.
- π¦ Reliable relaunch β handles Flatpak apps (
flatpak run) and single-instance apps (Ptyxis, Cursor/VS Code, browsers) that used to silently re-focus instead of opening a second window. - π₯οΈ Run a command in a terminal β give any captured terminal a command
(e.g.
claude) to run on boot, with the right syntax per terminal. - π΅ Startup sound β a bundled chime (offline), any web URL, or off.
- βοΈ Pre-launch command β optionally start a service your apps depend on.
- β»οΈ Reset to defaults in one click.
- π¦ Self-contained β venv, config, layout and sounds all live in the folder.
Your audio never leaves your machine. The mic is used only to detect
claps, analysed in real time by the local clap-detector library and
immediately discarded:
- π No recording to disk, no network, no cloud, no telemetry.
- ποΈ The listener is off by default β you turn it on (panel toggle or
clap ctl on); it isn't auto-enabled at install. - π Open source β read exactly what it does in
listener.py. See SECURITY.md.
clap serve [--port N] [--no-open] # web control panel
clap ctl on | off | toggle | status # control the listener
clap save # capture the current window layout
clap boot # replay the saved layout now
clap doctor # diagnose your setup (run this if stuck)Bind a GNOME keyboard shortcut to clap ctl toggle for hands-free on/off.
mic ββ listener ββ(N claps)βββΆ boot βββΆ relaunch saved apps
(clap-detector) + window-calls MoveResize
+ optional startup sound
β² β²
βββββββββββββ config.json ββββββββββββββββ
β²
web control panel (Flask) ββ systemctl --user βββΆ listener service
config.json is the single source of truth, read by both the listener and the
boot sequence. The web UI writes it and restarts the listener so changes apply
immediately. layout.json stores captured window geometry/launch commands.
Linux:
- GNOME on Wayland (e.g. Fedora, Ubuntu) with the window-calls extension enabled.
- Python 3.9+ and a C toolchain / PortAudio for the
clap-detectormic library (the installer offers to install PortAudio for you on dnf/apt/pacman/zypper systems). paplayorffplayfor the local startup sound.
Windows 10/11:
- Python 3.9+ (PyAudio installs from a prebuilt wheel β no compiler needed).
git(for the one-line installer).pywin32+psutilare installed automatically. Sound plays via the built-in Windows MCI API.
- Claps donβt trigger / trigger too easily β adjust Threshold bias in the
panel (higher = stricter). Check the listener log:
journalctl --user -u clap-to-open.service -f. - Windows open but donβt move β confirm the window-calls extension is
enabled (
gnome-extensions list | grep window-calls). - No sound β install
pipewire-utils/pulseaudio-utils(paplay) orffmpeg(ffplay), or set the sound mode to Off. - A captured app wonβt relaunch β Flatpak and single-instance apps are
resolved automatically now, but a few apps still record a command that canβt be
replayed verbatim. Run
clap bootfrom a terminal to see what failed, and open an issue with the app.
./scripts/uninstall.sh # removes the service + launcher; keeps your filesDelete the project folder to remove everything.
MIT Β© Forrest404
