From 5c241d65ed4a6ec2bc3e5d75d6858ed6722f1b17 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:23 +0100 Subject: feat(sway): add dictate (whisper.cpp) and ocr (tesseract) keybinds Push-to-talk dictation toggle on Super+i: parecord captures 16 kHz mono WAV, whisper-cli transcribes (auto language), output is typed via wtype and copied to the clipboard. Region OCR on Super+Shift+o: slurp + grim feed tesseract (eng+por), result lands in the clipboard with a notification preview. Adds wtype to wayland.txt; tesseract (+eng/por data) and whisper.cpp + the large-v3-turbo-q5_0 model package to extra.txt. --- dot_config/sway/config | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dot_config/sway/config') diff --git a/dot_config/sway/config b/dot_config/sway/config index edf1e32..c1d897f 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -157,6 +157,12 @@ bindsym XF86RFKill exec rfkill toggle all bindsym Print exec sh -c 'grim -g "$(slurp)" - | tee ~/pics/screenshots/$(date +%Y-%m-%d-%H-%M-%S).png | wl-copy' bindsym Shift+Print exec sh -c 'grim - | tee ~/pics/screenshots/$(date +%Y-%m-%d-%H-%M-%S).png | wl-copy' +# Dictation (push-to-talk toggle, whisper.cpp) +bindsym $mod+i exec ~/.local/bin/dictate + +# OCR — crop a region, copy text to clipboard (tesseract) +bindsym $mod+Shift+o exec ~/.local/bin/ocr + # Lock & pause bindsym $mod+Shift+s exec "playerctl -a pause; swaylock -f -e -c 282828" -- cgit v1.3.1