aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperSelect.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/UserScripts/WallpaperSelect.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh30
1 files changed, 8 insertions, 22 deletions
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh
index 78bf8d2f..272797e3 100755
--- a/config/hypr/UserScripts/WallpaperSelect.sh
+++ b/config/hypr/UserScripts/WallpaperSelect.sh
@@ -130,32 +130,18 @@ sleep 1
if [[ -n "$choice" ]]; then
sddm_sequoia="/usr/share/sddm/themes/sequoia_2"
if [ -d "$sddm_sequoia" ]; then
- notify-send -i "$iDIR/ja.png" "Set wallpaper" "as SDDM background?" \
- -t 10000 \
- -A "yes=Yes" \
- -A "no=No" \
- -h string:x-canonical-private-synchronous:wallpaper-notify
-
- # Wait for user input using dbus-monitor
- dbus-monitor "interface='org.freedesktop.Notifications',member='ActionInvoked'" |
- while read -r line; do
- if echo "$line" | grep -q "yes"; then
+ if yad --question --text="Set wallpaper as SDDM background?\nNOTE: This only applies to SEQUOIA SDDM Theme" --title="SDDM Background" --ok-label="Yes"; then
# Check if terminal exists
- if ! command -v "$terminal" &>/dev/null; then
- notify-send -i "$iDIR/ja.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background"
- exit 1
- fi
-
+ if ! command -v "$terminal" &>/dev/null; then
+ notify-send -i "$iDIR/ja.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background"
+ exit 1
+ fi
+
+ # Open terminal to enter password
$terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \
sudo cp -r $wallpaper_current '$sddm_sequoia/backgrounds/default' && \
notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'"
- break
- elif echo "$line" | grep -q "no"; then
- echo "Wallpaper not set as SDDM background. Exiting."
- break
- fi
-
- done &
+ fi
fi
fi \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage