bugfix
This commit is contained in:
@@ -129,6 +129,9 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
|
|||||||
SOURCE_DIR="$SCRIPT_DIR/config-files/debian"
|
SOURCE_DIR="$SCRIPT_DIR/config-files/debian"
|
||||||
DEST_DIR="$HOME"
|
DEST_DIR="$HOME"
|
||||||
|
|
||||||
|
# Variable to track if Xfce was running *before* we killed the processes
|
||||||
|
XFCE_WAS_RUNNING=0
|
||||||
|
|
||||||
# 1. Check if the source directory exists
|
# 1. Check if the source directory exists
|
||||||
if [ ! -d "$SOURCE_DIR" ]; then
|
if [ ! -d "$SOURCE_DIR" ]; then
|
||||||
say_red "Error: Source directory '$SOURCE_DIR' not found. Aborting."
|
say_red "Error: Source directory '$SOURCE_DIR' not found. Aborting."
|
||||||
@@ -162,10 +165,14 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
|
|||||||
|
|
||||||
say_green "Configurations copied to disk."
|
say_green "Configurations copied to disk."
|
||||||
|
|
||||||
# 4. Restart Xfce processes to load the new configuration (Conditional on initial state)
|
# 4. Cleanup and Restart Xfce processes to load the new configuration
|
||||||
# We use the stored XFCE_WAS_RUNNING variable to ensure we restart if we killed processes.
|
|
||||||
if [ "$XFCE_WAS_RUNNING" -eq 1 ]; then
|
if [ "$XFCE_WAS_RUNNING" -eq 1 ]; then
|
||||||
say_bold "Xfce was detected. Restarting components to load new configuration."
|
say_bold "Xfce was detected. Applying configuration changes immediately."
|
||||||
|
|
||||||
|
# CRITICAL FIX: Delete the session cache to prevent Xfce from restoring old settings
|
||||||
|
# This forces the session manager to read the new configuration files.
|
||||||
|
say_yellow "Clearing Xfce session cache to force a fresh configuration load..."
|
||||||
|
rm -rf "$HOME/.cache/sessions/"
|
||||||
|
|
||||||
# Restart Xfce processes to load the new configuration from the copied files
|
# Restart Xfce processes to load the new configuration from the copied files
|
||||||
say_cyan "Restarting Xfce environment components..."
|
say_cyan "Restarting Xfce environment components..."
|
||||||
|
|||||||
Reference in New Issue
Block a user