From 786fc97ea0f5aa838b80d04b81dffe94a3bacb69 Mon Sep 17 00:00:00 2001 From: Jelle Spreeuwenberg Date: Wed, 9 Sep 2026 20:08:46 +0200 Subject: [PATCH] feat: add local dictation with Handy and Niri shortcuts --- docs/constellation-work.md | 16 ++++++++++++++++ docs/constellation.md | 4 ++++ modules/capabilities/niri/_bindings.nix | 19 +++++++++++++++++++ modules/capabilities/niri/default.nix | 9 +++++++++ 4 files changed, 48 insertions(+) diff --git a/docs/constellation-work.md b/docs/constellation-work.md index 5602b06..c01007e 100644 --- a/docs/constellation-work.md +++ b/docs/constellation-work.md @@ -118,6 +118,22 @@ reports are not a fresh comparison with this baseline. ## Open choices and next discussion +Dictation: plain local transcription is selected; rambling cleanup is deferred. +The shared Niri module installs Handy and starts it hidden with the desktop. +Super+D toggles recording; Super+Shift+D cancels. Commands were verified against +the pinned Handy 0.9.1 source. No microphone recording or model download was run. +After user activation, launch Handy from Walker, download/select Parakeet V3, +keep automatic language detection and disable push-to-talk for toggle operation. +In Advanced, choose paste method None and clipboard handling Copy to Clipboard. +Keep post-processing disabled. Settings/models remain writable app-owned state. +Start Handy manually for the current session; desktop autostart applies on login. +Try an English and a Dutch recording, paste into Codex with Ctrl+Shift+V, then +submit manually. User feedback needed: recognition accuracy, delay and shortcut +delivery. Automatic paste can follow if wanted after checking Niri compatibility. +Verification: formatting, flake evaluation, Zenith and Polaris no-link system +builds, and whitespace checks passed. No system activation or interactive +dictation was performed; recognition quality and latency remain unmeasured. + The focus is the broader environment, not further API/database polish. Candidate areas remain places/ownership, navigation/interaction, human/agent collaboration, and system operation/maintenance; these are discussion areas, not a work queue. diff --git a/docs/constellation.md b/docs/constellation.md index 8f676dc..2eac5d0 100644 --- a/docs/constellation.md +++ b/docs/constellation.md @@ -27,6 +27,10 @@ use a flake to declare its tools without Nix owning the surrounding workspace. - Neovim, Niri, Walker and the terminal feel right: direct, keyboard-driven interaction with useful connections to the rest of the environment. +- Use Handy for local plain dictation, mainly English with occasional Dutch. + Start with Parakeet V3 and clipboard output. Niri owns recording shortcuts; + model downloads and microphone preferences remain application-owned. Cleanup + through Codex, a cloud API or a local language model is deferred. - Outlook is acceptable as an application, but its interaction and integration do not fit as naturally. Accessible mail for tools and agents matters separately from choosing a mail reader. Preserve meaning and source context, not just text. diff --git a/modules/capabilities/niri/_bindings.nix b/modules/capabilities/niri/_bindings.nix index 3c97fcc..97b1205 100644 --- a/modules/capabilities/niri/_bindings.nix +++ b/modules/capabilities/niri/_bindings.nix @@ -1,5 +1,6 @@ { browser, + handy, launcher, swapMonitorWorkspaces, terminal, @@ -34,6 +35,24 @@ in _props.hotkey-overlay-title = "App Launcher"; }; + # Dictation + "Mod+D" = { + spawn = [ + handy + "--toggle-transcription" + ]; + _props.repeat = false; + _props.hotkey-overlay-title = "Toggle Dictation"; + }; + "Mod+Shift+D" = { + spawn = [ + handy + "--cancel" + ]; + _props.repeat = false; + _props.hotkey-overlay-title = "Cancel Dictation"; + }; + # Hardware media, volume, and brightness keys "XF86AudioPlay" = spawnLocked "playerctl play-pause"; "XF86AudioStop" = spawnLocked "playerctl stop"; diff --git a/modules/capabilities/niri/default.nix b/modules/capabilities/niri/default.nix index 8af5212..62215ae 100644 --- a/modules/capabilities/niri/default.nix +++ b/modules/capabilities/niri/default.nix @@ -41,10 +41,18 @@ in playerctl brightnessctl wireplumber + handy ] ++ [ swapMonitorWorkspaces ]; }; + desktop.autostart = [ + [ + (lib.getExe pkgs.handy) + "--start-hidden" + ] + ]; + dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; wayland.windowManager.niri = { @@ -136,6 +144,7 @@ in terminal ; swapMonitorWorkspaces = lib.getExe swapMonitorWorkspaces; + handy = lib.getExe pkgs.handy; }; }; };