hypr-dotfiles/hypr/keybindings.lua
Jeena 0b9718cf2c hypr: add hold-to-talk voice dictation via whisrs
Bind the Copilot key (SUPER+SHIFT+F23) to whisrs on press and release,
so holding it records and letting go transcribes. Injection uses wtype,
which works natively on Hyprland and reaches any focused window,
including TUIs running in the dockerized agent containers.

Decoding runs on the iGPU through the Vulkan feature of a locally
rebuilt whisrs-git: the stock AUR build is CPU-only and compiled with
generic -march, which made dictation take around five seconds. Requires
whisrs-git (AUR), wtype and pipewire-alsa; documented in the README
along with the config and model locations.
2026-09-15 08:31:35 +09:00

43 lines
1.9 KiB
Lua

-- Keybindings (converted from keybindings.conf)
local P = require("programs")
hl.bind(P.mainMod .. " + T", hl.dsp.exec_cmd(P.terminal))
hl.bind(P.mainMod .. " + B", hl.dsp.exec_cmd(P.browser))
hl.bind(P.mainMod .. " + W", hl.dsp.window.close())
hl.bind(P.mainMod .. " + SHIFT + M", hl.dsp.exit())
hl.bind(P.mainMod .. " + E", hl.dsp.exec_cmd(P.fileManager))
hl.bind(P.mainMod .. " + V", hl.dsp.window.float())
-- App menu (original was bindr = $mainMod, SUPER_L, exec, $app_menu)
hl.bind(P.mainMod .. " + SUPER_L", hl.dsp.exec_cmd(P.app_menu), { release = true })
hl.bind("SHIFT + SUPER_L", hl.dsp.exec_cmd(P.menu))
-- dwindle
hl.bind(P.mainMod .. " + P", hl.dsp.window.pseudo())
-- dwindle
hl.bind(P.mainMod .. " + J", hl.dsp.layout("togglesplit"))
hl.bind(P.mainMod .. " + F", hl.dsp.window.fullscreen())
-- Screenshot
hl.bind("CTRL + PRINT", hl.dsp.exec_cmd("hyprshot -m active -m output"))
hl.bind("PRINT", hl.dsp.exec_cmd("hyprshot -m window"))
hl.bind("SHIFT + PRINT", hl.dsp.exec_cmd("hyprshot -m region"))
-- Color picker
hl.bind(P.mainMod .. " + C", hl.dsp.exec_cmd("hyprpicker --autocopy"))
-- Lock
hl.bind(P.mainMod .. " + L", hl.dsp.exec_cmd("~/.config/hypr/scripts/lock.sh"))
hl.bind(P.mainMod .. " + SHIFT + L", hl.dsp.exec_cmd("wlogout --protocol layer-shell"))
-- Cheatsheet
hl.bind(P.mainMod .. " + F1", hl.dsp.exec_cmd("~/.config/hypr/scripts/cheatsheet.py ~/.config/hypr/shortcuts.txt"))
-- OBS
hl.bind(P.mainMod .. " + ALT + TAB", hl.dsp.pass({ window = "class:^(com.obsproject.Studio)$" }))
hl.bind("F1", hl.dsp.pass({ window = "class:^(com.obsproject.Studio)$" }))
hl.bind("F2", hl.dsp.pass({ window = "class:^(com.obsproject.Studio)$" }))
-- Copilot key (sends SUPER+SHIFT+F23): hold-to-talk voice dictation via whisrs
-- press = start recording, release = stop and transcribe
hl.bind("SUPER + SHIFT + F23", hl.dsp.exec_cmd("whisrs toggle"))
hl.bind("SUPER + SHIFT + F23", hl.dsp.exec_cmd("whisrs toggle"), { release = true })