hypr-dotfiles/hypr/hosts/rutherford.lua
Jeena 1e90371cd8 hypr: make Calc the single hold-to-talk key on rutherford
Calc is one key and not a modifier, so nothing is held while whisrs
injects text — the held-AltGr problems (dropped long-hold releases,
first phrase swallowed by the TUI) don't apply. Pause worked too but
needs Fn+F12, two keys for a hold button. Cheatsheet lists Calc.
2026-09-18 06:54:48 +09:00

25 lines
1.4 KiB
Lua

-- Host-specific overrides: Rutherford (desktop PC)
-- Loaded automatically by hyprland.lua via hostname detection.
hl.monitor({
output = "DP-1",
mode = "2560x1440@74.97",
position = "0x0",
scale = 1,
})
-- Bare AltGr (right Alt on the TypeMatrix) is the hold-to-talk dictation key
-- here. Raw keycode 108 (KEY_RIGHTALT) so it matches in every kb group. Press
-- starts, release stops; the scripts guard the daemon state so stray toggles
-- (key repeat, missed release) can't invert it (see keybindings.lua).
-- Kept per-host so machines that use AltGr for characters aren't affected.
-- Calc is rutherford's hold-to-talk dictation key: a single non-modifier
-- key, so nothing is held while whisrs injects text. AltGr failed both ways:
-- Hyprland drops long-hold release events for modifier keys, and the first
-- phrase injected while AltGr was held never reached the target TUI. Pause
-- (Fn+F12) works but needs two keys for a hold button, so Calc won.
-- Press starts, release stops; the scripts guard the daemon state so stray
-- toggles (key repeat, missed release) can't invert it (see keybindings.lua).
-- Kept per-host so machines that use Calc aren't affected.
hl.bind("XF86Calculator", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-start.sh"))
hl.bind("XF86Calculator", hl.dsp.exec_cmd("~/.config/hypr/scripts/whisrs-hold-stop.sh"), { release = true })