aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/sway
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:23 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:23 +0100
commit5c241d65ed4a6ec2bc3e5d75d6858ed6722f1b17 (patch)
tree9885503fbde0324c04e51c6cd70bce143c4a8355 /dot_config/sway
parentd2da7ff900f360c0eec1e17f62df1358651ed77c (diff)
downloaddotfiles-5c241d65ed4a6ec2bc3e5d75d6858ed6722f1b17.tar.gz
dotfiles-5c241d65ed4a6ec2bc3e5d75d6858ed6722f1b17.tar.bz2
dotfiles-5c241d65ed4a6ec2bc3e5d75d6858ed6722f1b17.zip
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.
Diffstat (limited to 'dot_config/sway')
-rw-r--r--dot_config/sway/config6
1 files changed, 6 insertions, 0 deletions
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"