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

@ -12,10 +12,7 @@ check_news() {
fi
local newsOldTag="$(cat "$newsPath" 2> /dev/null)"
if [[ "$newsTag" != "$newsOldTag" ]]; then
dialog --yes-label 'Play' \
--no-label 'Later' \
--backtitle 'Audiogame Manager News' \
--yesno 'Audiogame manager news is available. Please use left and right arrows to navigate and enter to confirm.' -1 -1 || return
agm_yesno 'Audiogame Manager News' 'Audiogame Manager News' 'Audiogame manager news is available. Would you like to play it now?' || return
sox -qV0 "$newsFile" -d &> /dev/null
echo -n "$newsTag" > "$newsPath"
fi
@ -38,8 +35,7 @@ update() {
if [[ "$home" == "$remote" ]]; then
return
fi
dialog --backtitle "Audiogame Manager" \
--yesno "Updates are available. Would you like to update now?" -1 -1 --stdout || return
agm_yesno "Audiogame Manager" "Audiogame Manager" "Updates are available. Would you like to update now?" || return
{ git pull
git log '@{1}..' --pretty=format:'%an: %s' | tac; }
exit $?