Added yad dialogues if in GUI session, retains the dialog interface if in console.

This commit is contained in:
Storm Dragon
2025-08-01 15:25:53 -04:00
parent 15f90a7979
commit 76f0c66c96
16 changed files with 392 additions and 113 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# âe contents of this file are subject to the Common Public Attribution
# License Version 1.0 (the âcenseâ you may not use this file except in
@ -37,19 +37,23 @@
# Works which are defined in the CPAL as a work which combines Covered Code
# or portions thereof with code not governed by the terms of the CPAL.
# Source dialog interface wrapper
source "${0%/*}/../.includes/dialog-interface.sh"
cache="${XDG_CACHE_HOME:-$HOME/.cache}/audiogame-manager"
updateURL="https://www.kaldobsky.com/audiogames"
updateFiles=("SwampPatch.zip")
dialog --backtitle "Audiogame manager" --yesno "If you do not have a full 32 bit gstreamer installation, the Swamp music can cause stuttering and crashes. Would you like to remove the music directory after installation?" -1 -1 --stdout
agm_yesno "Swamp Update" "Swamp Update" "If you do not have a full 32 bit gstreamer installation, the Swamp music can cause stuttering and crashes. Would you like to remove the music directory after installation?"
deleteMusic=$?
# Back up configuration files.
for i in losers.txt muted.txt scriptkeys.txt keyconfig.ini ; do
cp -v ~/".local/wine/aprone/drive_c/Program Files/swamp/${i}" ~/".local/wine/aprone/drive_c/Program Files/swamp/${i}.agm"
echo "${i} backed up as ${i}.agm"
done | dialog --progressbox "Backing up configuration files. They can be found in your swamp directory." -1 -1
done | agm_progressbox "Swamp Update" "Backing up configuration files. They can be found in your swamp directory."
sleep 3
@ -57,7 +61,7 @@ sleep 3
for i in "${updateFiles[@]}" ; do
wget -O "${cache}/$i" "${updateURL}/$i"
unzip -o -d ~/".local/wine/aprone/drive_c/Program Files/swamp" "${cache}/${i}"
done | dialog --progressbox "Updating Swamp, please wait..." -1 -1
done | agm_progressbox "Swamp Update" "Updating Swamp, please wait..."
# Delete music if requested.
if [[ $deleteMusic -eq 0 ]]; then