Provide a Wayland-compatible daemon/client hotkey flow that uses system-level custom shortcuts (which call the helper binary) instead of in-app shortcut recording that is unreliable on Wayland.
Allow a fully headless helper invocation (--press) that pings a long-running Linux daemon to start/stop recording without initializing the GUI.
Update the Linux settings UI to instruct users how to configure the DE-level shortcut and show the exact command to paste (resolved from the running binary path).
Description
Added a Linux-only file linux_press_daemon.go that implements an init() path which detects --press, sends a silent HTTP GET http://127.0.0.1:9876/press, and os.Exit(0) on success, or runs notify-send "Voice App" "Please open the main application first" and os.Exit(1) when the daemon is not running.
Implemented a local daemon endpoint (/press) in the same Linux file that starts recording on the first press, resets a 300ms release timer on each incoming ping, and stops recording (triggering transcription) when the timer expires, using sync.Mutex and time.AfterFunc for debounce semantics.
Added a non-Linux stub linux_press_daemon_stub.go so the API is a no-op on other platforms.
Wire the daemon into the main app by calling a.startLinuxPressDaemon() from startup, and expose linux_press_command (computed with os.Executable() + " --press") and linux_press_mode in GetSettings() for the frontend.
Prevent saving/updating the in-app shortcut on Linux by skipping the shortcut branch in SaveSettings() when runtime.GOOS == "linux" so users rely on the DE-level command-based shortcut instead.
Updated the packaged frontend files: replaced the shortcut-recording input with a read-only Linux command field and a Copy button in frontend/dist/index.html, and modified frontend/dist/assets/index.fbf781c1.js to populate linux_press_command, show the Linux section when applicable, and add copyLinuxPressCommand() behaviour.
Testing
Ran gofmt -w over the modified Go files to ensure formatting compliance and the command completed successfully.
Per instruction no builds or runtime integration tests were executed in this change set, so no go build/go test or runtime verification was performed.
Frontend HTML/JS updates were applied to the distributed frontend/dist files and validated via file diffs, but no automated frontend build or browser tests were run.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/jahruz67/wisp-open/pull/3
**Author:** [@jahruz67](https://github.com/jahruz67)
**Created:** 5/20/2026
**Status:** ✅ Merged
**Merged:** 5/20/2026
**Merged by:** [@jahruz67](https://github.com/jahruz67)
**Base:** `main` ← **Head:** `codex/refactor-linux-global-hotkey-system`
---
### 📝 Commits (1)
- [`89af7f9`](https://github.com/jahruz67/wisp-open/commit/89af7f984174c24767dad8715597c26c9fa06f5f) Add Linux press-trigger daemon hotkey flow
### 📊 Changes
**5 files changed** (+135 additions, -38 deletions)
<details>
<summary>View changed files</summary>
📝 `app.go` (+39 -31)
📝 `frontend/dist/assets/index.fbf781c1.js` (+1 -1)
📝 `frontend/dist/index.html` (+7 -6)
➕ `linux_press_daemon.go` (+83 -0)
➕ `linux_press_daemon_stub.go` (+5 -0)
</details>
### 📄 Description
### Motivation
- Provide a Wayland-compatible daemon/client hotkey flow that uses system-level custom shortcuts (which call the helper binary) instead of in-app shortcut recording that is unreliable on Wayland.
- Allow a fully headless helper invocation (`--press`) that pings a long-running Linux daemon to start/stop recording without initializing the GUI.
- Update the Linux settings UI to instruct users how to configure the DE-level shortcut and show the exact command to paste (resolved from the running binary path).
### Description
- Added a Linux-only file `linux_press_daemon.go` that implements an `init()` path which detects `--press`, sends a silent HTTP `GET http://127.0.0.1:9876/press`, and `os.Exit(0)` on success, or runs `notify-send "Voice App" "Please open the main application first"` and `os.Exit(1)` when the daemon is not running.
- Implemented a local daemon endpoint (`/press`) in the same Linux file that starts recording on the first press, resets a 300ms release timer on each incoming ping, and stops recording (triggering transcription) when the timer expires, using `sync.Mutex` and `time.AfterFunc` for debounce semantics.
- Added a non-Linux stub `linux_press_daemon_stub.go` so the API is a no-op on other platforms.
- Wire the daemon into the main app by calling `a.startLinuxPressDaemon()` from `startup`, and expose `linux_press_command` (computed with `os.Executable() + " --press"`) and `linux_press_mode` in `GetSettings()` for the frontend.
- Prevent saving/updating the in-app shortcut on Linux by skipping the `shortcut` branch in `SaveSettings()` when `runtime.GOOS == "linux"` so users rely on the DE-level command-based shortcut instead.
- Updated the packaged frontend files: replaced the shortcut-recording input with a read-only Linux command field and a `Copy` button in `frontend/dist/index.html`, and modified `frontend/dist/assets/index.fbf781c1.js` to populate `linux_press_command`, show the Linux section when applicable, and add `copyLinuxPressCommand()` behaviour.
### Testing
- Ran `gofmt -w` over the modified Go files to ensure formatting compliance and the command completed successfully.
- Per instruction no builds or runtime integration tests were executed in this change set, so no `go build`/`go test` or runtime verification was performed.
- Frontend HTML/JS updates were applied to the distributed `frontend/dist` files and validated via file diffs, but no automated frontend build or browser tests were run.
------
[Codex Task](https://chatgpt.com/codex/cloud/tasks/task_e_6a0d187501cc832eaed17be2346822d2)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/jahruz67/wisp-open/pull/3
Author: @jahruz67
Created: 5/20/2026
Status: ✅ Merged
Merged: 5/20/2026
Merged by: @jahruz67
Base:
main← Head:codex/refactor-linux-global-hotkey-system📝 Commits (1)
89af7f9Add Linux press-trigger daemon hotkey flow📊 Changes
5 files changed (+135 additions, -38 deletions)
View changed files
📝
app.go(+39 -31)📝
frontend/dist/assets/index.fbf781c1.js(+1 -1)📝
frontend/dist/index.html(+7 -6)➕
linux_press_daemon.go(+83 -0)➕
linux_press_daemon_stub.go(+5 -0)📄 Description
Motivation
--press) that pings a long-running Linux daemon to start/stop recording without initializing the GUI.Description
linux_press_daemon.gothat implements aninit()path which detects--press, sends a silent HTTPGET http://127.0.0.1:9876/press, andos.Exit(0)on success, or runsnotify-send "Voice App" "Please open the main application first"andos.Exit(1)when the daemon is not running./press) in the same Linux file that starts recording on the first press, resets a 300ms release timer on each incoming ping, and stops recording (triggering transcription) when the timer expires, usingsync.Mutexandtime.AfterFuncfor debounce semantics.linux_press_daemon_stub.goso the API is a no-op on other platforms.a.startLinuxPressDaemon()fromstartup, and exposelinux_press_command(computed withos.Executable() + " --press") andlinux_press_modeinGetSettings()for the frontend.shortcutbranch inSaveSettings()whenruntime.GOOS == "linux"so users rely on the DE-level command-based shortcut instead.Copybutton infrontend/dist/index.html, and modifiedfrontend/dist/assets/index.fbf781c1.jsto populatelinux_press_command, show the Linux section when applicable, and addcopyLinuxPressCommand()behaviour.Testing
gofmt -wover the modified Go files to ensure formatting compliance and the command completed successfully.go build/go testor runtime verification was performed.frontend/distfiles and validated via file diffs, but no automated frontend build or browser tests were run.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.