Skip to content

Conversation

@justapithecus
Copy link
Owner

@justapithecus justapithecus commented Feb 8, 2026

Summary

Clipboard-based transcript injection allows pasting voice transcripts into any application (Claude Code, Codex, etc.) that doesn't support ZLE widgets. Adds tmux keybindings and KDE global shortcuts as trigger mechanisms that work outside the zsh prompt.

Highlights

  • copy_to_clipboard() auto-detects Wayland vs X11 (wl-copy / xclip) and copies transcript after transcription
  • notify() uses kdialog --passivepopup for desktop notifications when triggered from global shortcuts
  • Minimal tmux config with prefix+v (start) / prefix+y (stop) voice keybindings and sensible defaults
  • KDE .desktop files for Meta+Shift+V / Meta+Shift+Y global shortcuts
  • Install scripts wire everything together — KDE shortcut Exec= paths rewritten to absolute $HOME/.local/bin/voice-record during install
  • wl-clipboard added to zypper build deps

Test plan

  • voice-record stop → transcript appears in clipboard (xclip -selection clipboard -o)
  • kdialog notification pops up after start and stop
  • In tmux: prefix + v starts recording, prefix + y stops and populates clipboard
  • KDE global shortcut: Meta+Shift+V / Meta+Shift+Y trigger outside terminal
  • In Claude Code: trigger via tmux or global shortcut → Ctrl-Shift-V pastes transcript
  • ZLE widgets still work at plain zsh prompt (Ctrl-B / Ctrl-Y)

🤖 Generated with Claude Code

justapithecus and others added 3 commits February 8, 2026 13:56
## Summary

Add push-to-talk voice input for zsh terminal workflows. Ctrl-B starts
background mic capture via arecord/PipeWire, Ctrl-Y stops recording,
runs local ASR via whisper.cpp, and pastes the transcript into the
prompt. All logic is CLI-first and dotfiles-managed.

## Highlights

- `voice-record` script: start/stop arecord in background, transcribe
  via whisper-cli, write transcript atomically to state file
- `voice-paste` script: print last transcript to stdout for composability
- ZLE widgets bind Ctrl-B (record) and Ctrl-Y (stop + transcribe + paste)
- Installer builds whisper.cpp from source and downloads ggml-base.en model
- Shared config.env with env-var overrides for device, format, rate,
  ASR binary, model path, and state paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Every other subtree uses `<subtree>/install.sh`, not a nested
`install/` directory. Fixes the REPO_ROOT path detection accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clipboard-based transcript injection allows pasting voice transcripts
into any application (Claude Code, Codex, etc.) that doesn't support
ZLE widgets.

- copy_to_clipboard() auto-detects Wayland vs X11 (wl-copy / xclip)
- kdialog passive popup notifications for start/stop feedback
- Minimal tmux config with prefix+v / prefix+y voice keybindings
- KDE .desktop files for Meta+Shift+V / Meta+Shift+Y global shortcuts
- Install scripts wire everything together with absolute path rewriting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@justapithecus justapithecus changed the title feat(voice): ✨ add keyboard-driven voice-to-text terminal input feat(voice): ✨ add clipboard injection, tmux bindings, and KDE shortcuts Feb 8, 2026
justapithecus and others added 4 commits February 8, 2026 15:17
- ZLE: Ctrl-B/Ctrl-Y → Alt-r/Alt-s (avoids tmux prefix capture)
- tmux: prefix+v/prefix+y → prefix+r/prefix+s (mnemonic: record/stop)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Background the stop command in tmux so it doesn't block input
- Cap whisper-cli to 2 threads to avoid starving the system
- Lower CPU priority with nice -n 15
- Add "Transcribing…" notification so user gets immediate feedback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use setsid to fully detach stop command so run-shell returns
  immediately
- Inject transcript directly into tmux pane via send-keys

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
setsid broke clipboard and tmux injection by detaching from the
session. run-shell -b (tmux 3.2+) backgrounds natively without
losing environment context.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant