[PR #4] [MERGED] Add Linux 'press' helper and UI support for system hotkey command #4

Closed
opened 2026-08-08 18:06:17 +00:00 by jahruz67 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jahruz67/wisp-open/pull/4
Author: @jahruz67
Created: 5/20/2026
Status: Merged
Merged: 5/20/2026
Merged by: @jahruz67

Base: mainHead: codex/refactor-linux-global-hotkey-system-8g9jyq


📝 Commits (1)

  • 7fe25ae Fix Linux hotkey UI changes in source frontend files

📊 Changes

7 files changed (+166 additions, -59 deletions)

View changed files

📝 app.go (+39 -31)
📝 frontend/dist/assets/index.fbf781c1.js (+1 -1)
📝 frontend/dist/index.html (+7 -6)
📝 frontend/index.html (+7 -6)
📝 frontend/src/main.js (+24 -15)
linux_press_daemon.go (+83 -0)
linux_press_daemon_stub.go (+5 -0)

📄 Description

Motivation

  • Provide a reliable way for Linux Wayland users to trigger recording from a custom desktop shortcut by exposing a small --press helper and in-app HTTP daemon.
  • Avoid trying to register modifier-only/native global hotkeys on Linux and instead surface a copyable command users can wire into their DE keyboard settings.
  • Surface the Linux-specific command in the settings UI so users can easily install a system shortcut.

Description

  • Added a Linux-only HTTP daemon (linux_press_daemon.go) that listens on 127.0.0.1:9876 and maps /press requests to a short press/hold recording sequence by calling StartRecording and StopRecording on a timer.
  • Added a non-Linux stub (linux_press_daemon_stub.go) so startLinuxPressDaemon is a no-op on other platforms.
  • On startup, call a.startLinuxPressDaemon() so the daemon is available on Linux.
  • Implemented a small helper mode where invoking the executable with --press will send a ping to the daemon and exit (used by custom desktop shortcuts).
  • Updated settings handling to avoid parsing/updating native hotkey shortcuts on Linux, keeping existing shortcut registration logic for other OSes.
  • Exposed linux_press_command and linux_press_mode in GetSettings so the frontend can show a copyable command.
  • Frontend/UI changes to show a new Linux section with the generated command, a copy button, and instructions for GNOME/KDE, plus JavaScript to copy the command to the clipboard (copyLinuxPressCommand) and reveal the section when linux_press_mode is present.
  • Minor cleanup: adjusted imports and formatting and restored some clipboard whitespace trimming in processRecording and ensured hotkey listener starts when created in SaveSettings.

Testing

  • Built the Go backend with go build ./... which completed successfully.
  • Built the frontend assets with the production build (npm run build) and verified the new UI code was included in the generated files.
  • Performed a basic runtime smoke test on Linux by launching the app and verifying the settings page shows the Linux command and that copying it places the command on the clipboard.

Codex Task


🔄 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/4 **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-8g9jyq` --- ### 📝 Commits (1) - [`7fe25ae`](https://github.com/jahruz67/wisp-open/commit/7fe25ae125407b6ae01b133e8fcf0e273ae99ba5) Fix Linux hotkey UI changes in source frontend files ### 📊 Changes **7 files changed** (+166 additions, -59 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) 📝 `frontend/index.html` (+7 -6) 📝 `frontend/src/main.js` (+24 -15) ➕ `linux_press_daemon.go` (+83 -0) ➕ `linux_press_daemon_stub.go` (+5 -0) </details> ### 📄 Description ### Motivation - Provide a reliable way for Linux Wayland users to trigger recording from a custom desktop shortcut by exposing a small `--press` helper and in-app HTTP daemon. - Avoid trying to register modifier-only/native global hotkeys on Linux and instead surface a copyable command users can wire into their DE keyboard settings. - Surface the Linux-specific command in the settings UI so users can easily install a system shortcut. ### Description - Added a Linux-only HTTP daemon (`linux_press_daemon.go`) that listens on `127.0.0.1:9876` and maps `/press` requests to a short press/hold recording sequence by calling `StartRecording` and `StopRecording` on a timer. - Added a non-Linux stub (`linux_press_daemon_stub.go`) so `startLinuxPressDaemon` is a no-op on other platforms. - On startup, call `a.startLinuxPressDaemon()` so the daemon is available on Linux. - Implemented a small helper mode where invoking the executable with `--press` will send a ping to the daemon and exit (used by custom desktop shortcuts). - Updated settings handling to avoid parsing/updating native hotkey shortcuts on Linux, keeping existing shortcut registration logic for other OSes. - Exposed `linux_press_command` and `linux_press_mode` in `GetSettings` so the frontend can show a copyable command. - Frontend/UI changes to show a new Linux section with the generated command, a copy button, and instructions for GNOME/KDE, plus JavaScript to copy the command to the clipboard (`copyLinuxPressCommand`) and reveal the section when `linux_press_mode` is present. - Minor cleanup: adjusted imports and formatting and restored some clipboard whitespace trimming in `processRecording` and ensured hotkey listener starts when created in `SaveSettings`. ### Testing - Built the Go backend with `go build ./...` which completed successfully. - Built the frontend assets with the production build (`npm run build`) and verified the new UI code was included in the generated files. - Performed a basic runtime smoke test on Linux by launching the app and verifying the settings page shows the Linux command and that copying it places the command on the clipboard. ------ [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>
jahruz67 added the pull-request label 2026-08-08 18:06:17 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jahruz67/wisp-open#4