Changed shutdown/reboot dialog from zenity to

directly in terminal.
This commit is contained in:
2026-05-22 16:15:45 +02:00
parent 83e9159d0e
commit 2e57d9defb
2 changed files with 20 additions and 17 deletions
+7 -9
View File
@@ -1,5 +1,4 @@
#!/bin/bash
# Funktion til Flatpak apps
close_flatpak() {
local app="$1"
@@ -57,14 +56,13 @@ else
echo "Steam not running, skipping..."
fi
# Popup
zenity --question \
--title="Shutdown" \
--text="All programs have been closed.\nDo you want to shut down the PC?" \
--ok-label="Shut down" \
--cancel-label="Cancel" \
2>/dev/null
# Prompt
read -r -p "All programs closed. Shut down? [Y/n]: " response
response="${response:-Y}" # Y er default ved enter
if [ $? -eq 0 ]; then
if [[ "$response" =~ ^[Yy]$ ]]; then
sudo shutdown -h now
else
echo "Shutdown cancelled."
fi