From 2a49518887ab2d36be2f19dcc396560b58976e81 Mon Sep 17 00:00:00 2001 From: "[yuri]" <[yuri.kuit@gmail.com]> Date: Tue, 11 Nov 2025 14:52:20 +0100 Subject: [PATCH] bugfix --- v2/debian-full.sh | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/v2/debian-full.sh b/v2/debian-full.sh index 504be35..7d9620f 100755 --- a/v2/debian-full.sh +++ b/v2/debian-full.sh @@ -149,13 +149,34 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then shopt -u dotglob # 4. Restart Xfce processes to load the new configuration - say_cyan "Restarting Xfce environment components to load the new layout..." - # Restart the Window Manager first - xfwm4 --replace & disown - # Restart the Panel - xfce4-panel & disown - say_green "Configurations copied and successfully loaded." - say_cyan "Panel and Window Manager restarted." + # We check for a running 'xfce4-panel' process to determine if we are in an Xfce session. + if pgrep -x "xfce4-panel" > /dev/null; then + say_bold "Xfce Panel detected. Applying configuration changes immediately." + + # Aggressively stop Xfce processes to prevent the old settings from being saved. + say_yellow "Stopping Xfce Panel and Configuration Daemon to prevent settings overwrite..." + pkill xfce4-panel + pkill xfconfd + # Optionally stop the window manager, to ensure a full refresh + pkill xfwm4 + sleep 1 + + # Restart Xfce processes to load the new configuration from the copied files + say_cyan "Restarting Xfce environment components to load the new layout..." + + # Restart the Window Manager first + xfwm4 --replace & disown + + # Restart the Panel + xfce4-panel & disown + + say_green "Xfce configuration successfully loaded and applied." + say_cyan "Panel and Window Manager restarted." + else + say_cyan "Xfce Panel process not found. Configurations copied to $HOME." + say_cyan "Please log out and log back in to fully apply the Xfce configuration changes." + fi + fi