From 64ef804433940659852ab4164a1c3f926e59ac3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=BCndel?= Date: Fri, 27 Mar 2026 21:18:19 +0100 Subject: [PATCH] Enable GPU in voxtype if Vulkan is available (#5005) * Enable GPU support in Voxtype installation if Vulkan is available * Restart Voxtype and Waybar after enabling GPU support in setup * fix: revert changing existing migration * fix: add new migration * Refactor Vulkan availability check in voxtype installation and migration scripts * Extract vulkan availability check --------- Co-authored-by: David Heinemeier Hansson --- bin/omarchy-hw-vulkan | 6 ++++++ bin/omarchy-voxtype-install | 3 +++ migrations/1773506226.sh | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100755 bin/omarchy-hw-vulkan create mode 100644 migrations/1773506226.sh diff --git a/bin/omarchy-hw-vulkan b/bin/omarchy-hw-vulkan new file mode 100755 index 00000000..8d473a24 --- /dev/null +++ b/bin/omarchy-hw-vulkan @@ -0,0 +1,6 @@ +#!/bin/bash + +# Detect whether Vulkan is available. + +[[ -d /usr/share/vulkan/icd.d ]] && + find /usr/share/vulkan/icd.d -maxdepth 1 -name "*.json" -print -quit | grep -q . diff --git a/bin/omarchy-voxtype-install b/bin/omarchy-voxtype-install index 524ff4c6..6d2e1c42 100755 --- a/bin/omarchy-voxtype-install +++ b/bin/omarchy-voxtype-install @@ -11,6 +11,9 @@ if gum confirm "Install Voxtype + AI model (~150MB) to enable dictation?"; then cp $OMARCHY_PATH/default/voxtype/config.toml ~/.config/voxtype/ voxtype setup --download --no-post-install + if omarchy-hw-vulkan; then + voxtype setup gpu --enable || true + fi voxtype setup systemd omarchy-restart-waybar diff --git a/migrations/1773506226.sh b/migrations/1773506226.sh new file mode 100644 index 00000000..88c84a9f --- /dev/null +++ b/migrations/1773506226.sh @@ -0,0 +1,16 @@ +echo "Enable GPU in voxtype if Vulkan is available" + +if omarchy-cmd-present voxtype; then + if omarchy-hw-vulkan; then + echo "Vulkan is available, enabling GPU in voxtype" + voxtype setup gpu --enable || true + fi + + # see https://github.com/peteonrails/voxtype/commit/ce6e9919cbe54cb8808dcb3cdd3bcb3260d7b900 + # earlier versions of voxtype hard-coded the non-GPU backend in the systemd service file, + # so we need to re-run setup to update it to use /usr/bin/voxtype (the symlink) + voxtype setup systemd + + systemctl --user restart voxtype + omarchy-restart-waybar +fi