diff --git a/.config/ags/scripts/color_generation/switchwall.sh b/.config/ags/scripts/color_generation/switchwall.sh index 783288d70..1d295ff48 100755 --- a/.config/ags/scripts/color_generation/switchwall.sh +++ b/.config/ags/scripts/color_generation/switchwall.sh @@ -27,7 +27,7 @@ kill_existing_mpvpaper() { create_restore_script() { local video_path=$1 - cat > "$RESTORE_SCRIPT" << EOF + cat > "$RESTORE_SCRIPT.tmp" << EOF #!/bin/bash # Generated by switchwall.sh - Don't modify it by yourself. # Time: $(date) @@ -40,6 +40,7 @@ for monitor in \$(hyprctl monitors -j | jq -r '.[] | .name'); do done EOF + mv "$RESTORE_SCRIPT.tmp" $RESTORE_SCRIPT chmod +x "$RESTORE_SCRIPT" }