add cancel action to pipeline to stop without transcribing

This commit is contained in:
LeonardoTrapani
2025-10-10 20:08:41 +02:00
parent b437f575e6
commit e8b9c1eff0
5 changed files with 46 additions and 6 deletions
+10
View File
@@ -129,6 +129,9 @@ hyprvoice serve
# Toggle recording on/off
hyprvoice toggle
# Cancel current operation
hyprvoice cancel
# Check current status
hyprvoice status
@@ -145,6 +148,7 @@ Most setups use this toggle pattern in window manager config:
```bash
bind = SUPER, R, exec, hyprvoice toggle
bind = SUPER SHIFT, R, exec, hyprvoice cancel # Optional: cancel current operation
```
## Keyboard Shortcuts Setup
@@ -157,6 +161,9 @@ Add to your `~/.config/hypr/hyprland.conf`:
# Hyprvoice - Voice to Text (toggle recording)
bind = SUPER, R, exec, hyprvoice toggle
# Optional: Cancel current operation
bind = SUPER SHIFT, C, exec, hyprvoice cancel
# Optional: Status check
bind = SUPER SHIFT, R, exec, hyprvoice status && notify-send "Hyprvoice" "$(hyprvoice status)"
```
@@ -170,6 +177,8 @@ bind = SUPER SHIFT, R, exec, hyprvoice status && notify-send "Hyprvoice" "$(hypr
3. **Press keybind again** → Recording stops, transcription begins
4. **Text appears** → Injected at cursor position or clipboard
**Cancel anytime:** Press your cancel keybind (e.g., `SUPER+SHIFT+C`) to abort the current operation and return to idle.
### CLI Usage
```bash
@@ -615,6 +624,7 @@ go run ./cmd/hyprvoice stop
Simple single-character commands over Unix socket:
- `t` - Toggle recording on/off
- `c` - Cancel current operation
- `s` - Get current status
- `v` - Get protocol version
- `q` - Quit daemon gracefully