From 46d659d0a5de82432fd28ae05d9df98580e4a27a Mon Sep 17 00:00:00 2001 From: Collie Tsai Date: Tue, 1 Sep 2026 03:14:55 +0800 Subject: [PATCH] feat(voice): add unprivileged OpenWhispr trial Install pinned user-local archives on Linux and macOS while retaining VoxType as the rollback path. Verify native paste tools and prevent input-group, udev, or ydotoold setup in CI. --- .github/workflows/test-distros.yaml | 26 ++++++++++++++++++++++++++ home/.chezmoidata/packages.yaml | 2 ++ home/.chezmoiexternal.toml | 21 +++++++++++++++++++++ home/dot_config/hypr/hyprland.lua.tmpl | 2 ++ 4 files changed, 51 insertions(+) diff --git a/.github/workflows/test-distros.yaml b/.github/workflows/test-distros.yaml index b253cb4..5b53710 100644 --- a/.github/workflows/test-distros.yaml +++ b/.github/workflows/test-distros.yaml @@ -21,6 +21,15 @@ jobs: useradd -m dev echo "dev ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/dev sudo -H -u dev chezmoi init collieiscute --branch "$CHEZMOI_BRANCH" --apply -v + - name: Verify unprivileged OpenWhispr install + run: | + test -x /home/dev/.local/libexec/openwhispr/open-whispr + grep -Fq openwhispr-binds.lua /home/dev/.config/hypr/hyprland.lua + command -v wl-copy + command -v wtype + ! id -nG dev | grep -qw input + test ! -e /etc/udev/rules.d/70-uinput.rules + ! command -v ydotoold ubuntu: name: ubuntu:latest @@ -35,6 +44,15 @@ jobs: sh -c "$(curl -fsLS get.chezmoi.io)" -- -b /usr/local/bin echo "ubuntu ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/ubuntu sudo -H -u ubuntu chezmoi init collieiscute --branch "$CHEZMOI_BRANCH" --apply -v + - name: Verify unprivileged OpenWhispr install + run: | + test -x /home/ubuntu/.local/libexec/openwhispr/open-whispr + grep -Fq openwhispr-binds.lua /home/ubuntu/.config/hypr/hyprland.lua + command -v wl-copy + command -v wtype + ! id -nG ubuntu | grep -qw input + test ! -e /etc/udev/rules.d/70-uinput.rules + ! command -v ydotoold macos: name: macos:latest @@ -46,6 +64,11 @@ jobs: - name: chezmoi init dotfiles run: | chezmoi init collieiscute --branch "$CHEZMOI_BRANCH" --apply -v + - name: Verify user-local OpenWhispr install + run: | + binary="$HOME/.local/libexec/openwhispr/OpenWhispr.app/Contents/MacOS/OpenWhispr" + test -x "$binary" + file "$binary" | grep -q "$(uname -m)" windows: name: windows:latest @@ -58,3 +81,6 @@ jobs: iex "&{$(irm 'https://get.chezmoi.io/ps1')} -b '$binDir'" $chezmoi = Join-Path $binDir "chezmoi.exe" & $chezmoi init collieiscute --branch "$env:CHEZMOI_BRANCH" --apply -v + if (Test-Path (Join-Path $HOME ".local/libexec/openwhispr")) { + throw "OpenWhispr external must remain scoped to Linux and macOS" + } diff --git a/home/.chezmoidata/packages.yaml b/home/.chezmoidata/packages.yaml index 7700ac4..bb64ef3 100644 --- a/home/.chezmoidata/packages.yaml +++ b/home/.chezmoidata/packages.yaml @@ -146,6 +146,8 @@ packages: - unzip - wget - wireplumber + - wl-clipboard + - wtype - xdg-desktop-portal-gtk - xdg-desktop-portal-hyprland - xwayland diff --git a/home/.chezmoiexternal.toml b/home/.chezmoiexternal.toml index e4981f2..8bf730e 100644 --- a/home/.chezmoiexternal.toml +++ b/home/.chezmoiexternal.toml @@ -42,6 +42,14 @@ filter.args = ["-NoProfile", "-Command", "$input -replace 'matugen','noctalia' - {{ end -}} {{ if eq .chezmoi.os "linux" -}} +[".local/libexec/openwhispr"] +type = "archive" +url = "https://github.com/OpenWhispr/openwhispr/releases/download/v1.9.2/OpenWhispr-1.9.2-linux-x64.tar.gz" +exact = true +stripComponents = 1 +checksum.sha256 = "af97777bc5857e14947aedf08d353dd27fc5d2f10e27a22a3f05f2f5a0f041cd" +checksum.size = 524376464 + [".local/libexec/crispasr"] type = "archive" url = "https://github.com/CrispStrobe/CrispASR/releases/download/v0.8.28/crispasr-linux-x86_64-vulkan.tar.gz" @@ -57,6 +65,19 @@ executable = true checksum.sha256 = "12e794655f0e0efadceb92e6313cec2c618c571892490368d0b90194cc27cc6e" checksum.size = 24338816 +[".local/libexec/openwhispr"] +type = "archive" +exact = true +{{ if eq .chezmoi.arch "arm64" -}} +url = "https://github.com/OpenWhispr/openwhispr/releases/download/v1.9.2/OpenWhispr-1.9.2-arm64-mac.zip" +checksum.sha256 = "20f7fdba991f76b2434ddb91084276bf1bb333dd24718acb2dc620946af5c877" +checksum.size = 330986805 +{{ else -}} +url = "https://github.com/OpenWhispr/openwhispr/releases/download/v1.9.2/OpenWhispr-1.9.2-mac.zip" +checksum.sha256 = "6c7a26a4c369514c49f5d39d97f11cb21b7d29c7e14e066e45cc9f8ef60a5a6b" +checksum.size = 330672539 +{{ end -}} + [".local/libexec/crispasr"] type = "archive" url = "https://github.com/CrispStrobe/CrispASR/releases/download/v0.8.28/crispasr-macos.tar.gz" diff --git a/home/dot_config/hypr/hyprland.lua.tmpl b/home/dot_config/hypr/hyprland.lua.tmpl index 33d0fa4..fd2868e 100644 --- a/home/dot_config/hypr/hyprland.lua.tmpl +++ b/home/dot_config/hypr/hyprland.lua.tmpl @@ -343,3 +343,5 @@ hl.window_rule({ -- For Noctalia Color templates require("noctalia").apply_theme() + +pcall(require, "{{ .chezmoi.homeDir }}/.config/hypr/openwhispr-binds.lua")