fix(installer): install OpenDeck from AUR instead of Flatpak

opendeck is not in the official repos, so install the native AUR package
with yay (matching the repo's other AUR modules) and drop the Flatpak
path. Wire `opendeck` into Hyprland autostart instead of
`flatpak run com.mairtech.OpenDeck`, and update the idempotency guard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
main
Amir Alexander Abdelbaki 2026-06-26 16:04:13 +02:00
parent 10a5fbb33b
commit 0ab535f772
1 changed files with 7 additions and 5 deletions

View File

@ -5,17 +5,19 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../lib/logging.sh"
log "Installing ydotool (pacman)..."
sudo pacman -S --noconfirm --needed ydotool
log "Installing OpenDeck (Flatpak)..."
ensure_flatpak
flatpak install -y flathub com.mairtech.OpenDeck
log "Installing OpenDeck (AUR)..."
# opendeck is not in the official Arch repos; install the native package from
# the AUR instead of Flatpak so it runs as a plain `opendeck` binary.
# --answerdiff None / --answerclean All suppress interactive PKGBUILD/clean prompts.
yay -S --answerdiff None --answerclean All --noconfirm opendeck
log "Wiring ydotoold + OpenDeck into Hyprland autostart..."
AUTOSTART="$HOME/Dotfiles/desktopenvs/hyprlua/hypr/usr/autostart.lua"
if grep -q "ydotoold\|OpenDeck\|com.mairtech.OpenDeck" "$AUTOSTART"; then
if grep -q "ydotoold\|opendeck\|OpenDeck" "$AUTOSTART"; then
skip "ydotoold/OpenDeck already present in autostart.lua — skipping."
else
# Insert before the closing end) so entries appear inside the on("hyprland.start") block
sed -i 's|^end)$| hl.exec_cmd("ydotoold")\n hl.exec_cmd("flatpak run com.mairtech.OpenDeck")\nend)|' "$AUTOSTART"
sed -i 's|^end)$| hl.exec_cmd("ydotoold")\n hl.exec_cmd("opendeck")\nend)|' "$AUTOSTART"
log "Autostart entries added."
fi