mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
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 <david@hey.com>
This commit is contained in:
co-authored by
David Heinemeier Hansson
parent
54bd72f10a
commit
64ef804433
Executable
+6
@@ -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 .
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user