diff --git a/system_files/deck/shared/usr/share/ublue-os/just/85-bazzite-image.just b/system_files/deck/shared/usr/share/ublue-os/just/85-bazzite-image.just index e65cb0a5f5..fa688c0838 100644 --- a/system_files/deck/shared/usr/share/ublue-os/just/85-bazzite-image.just +++ b/system_files/deck/shared/usr/share/ublue-os/just/85-bazzite-image.just @@ -203,3 +203,30 @@ _toggle-autologin: else sudo touch $DESKTOP_AUTOLOGIN fi + +# Restore the "Return to Gaming Mode" shortcut on the Desktop +restore-gamemode-shortcut: + #!/usr/bin/bash + # Define paths + SHORTCUT_FILE="$HOME/Desktop/Return.desktop" + SKEL_FILE="/etc/skel/Desktop/Return.desktop" + # Check if the shortcut already exists + if [ -f "$SHORTCUT_FILE" ]; then + echo "The shortcut 'Return to Gaming Mode' already exists at $SHORTCUT_FILE." + echo "No changes were made." + exit 0 + fi + # Check if the original file exists in skel + if [ ! -f "$SKEL_FILE" ]; then + echo "Error: The original file does not exist at $SKEL_FILE." + echo "Unable to restore the shortcut." + exit 1 + fi + # Copy the file from skel to the desktop + echo "Restoring the 'Return to Gaming Mode' shortcut from $SKEL_FILE..." + mkdir -p "$HOME/Desktop" # Ensure the Desktop directory exists + cp "$SKEL_FILE" "$SHORTCUT_FILE" + # Ensure the file is executable + chmod +x "$SHORTCUT_FILE" + echo "Shortcut restored successfully at $SHORTCUT_FILE." + echo "Note: The first time you use the shortcut, it may ask you to trust it. Please accept." diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just b/system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just index 8b4dce21fe..512a2a8de7 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/80-bazzite.just @@ -13,19 +13,113 @@ _install-system-flatpaks: FLATPAK_LIST="$(curl https://raw.githubusercontent.com/ublue-os/bazzite/main/installer/${FLATPAKS} | tr '\n' ' ')" flatpak --system -y install --or-update ${FLATPAK_LIST} -# Configure grub bootmenu visibility and fix duplicate entries +# Configure grub bootmenu visibility. pass action 'help' for more info. configure-grub ACTION="": #!/usr/bin/bash - echo "Editing grub is no longer recommended and this script has been removed" - echo - echo "Reason:" - echo "Grub is auto-hidden now on successful boots and reappears only if you" - echo "shutdown too early. You can still access it by holding shift. Deck" - echo "images will also automatically rollback after 2 failed boots, so grub" - echo "will need to be visible for you to see that." + source /usr/lib/ujust/ujust.sh + # Function to display usage/help with some color + print_help() { + echo -e "Usage: ujust configure-grub