v3-revamp-fedora

This commit is contained in:
2026-07-06 20:35:53 +02:00
parent 931127bb2e
commit 9ca3c3b727
+9 -16
View File
@@ -110,8 +110,9 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
pause_if_debug pause_if_debug
# Set default terminal to Alacritty # Set default terminal to Alacritty (Configured unconditionally)
if command -v alacritty >/dev/null 2>&1; then color_cyan "Pre-configuring XFCE default terminal settings for Alacritty..."
# 1. Force initialize the base XDG/XFCE config hierarchy # 1. Force initialize the base XDG/XFCE config hierarchy
mkdir -p "$HOME/.config/xfce4" mkdir -p "$HOME/.config/xfce4"
mkdir -p "$HOME/.config/menus" mkdir -p "$HOME/.config/menus"
@@ -128,7 +129,8 @@ if [[ "${DE}" == "xfce" || "${DDE}" == "xfce" ]]; then
fi fi
done done
# 3. Create the missing standard XDG MIME association files manually # 3. Create the standard XDG MIME association files manually
mkdir -p "$HOME/.config"
MIME_FILE="$HOME/.config/mimeapps.list" MIME_FILE="$HOME/.config/mimeapps.list"
touch "$MIME_FILE" touch "$MIME_FILE"
@@ -139,20 +141,11 @@ x-scheme-handler/terminal=alacritty.desktop
user-extension/x-terminal-emulator=alacritty.desktop user-extension/x-terminal-emulator=alacritty.desktop
EOF EOF
# 4. Handle System-Wide Alternatives (For Debian/Ubuntu/Fedora base integrations) # 4. Pre-seed Xfconf properties directly into the XML tree file structure
# This covers the underlying system-wide 'x-terminal-emulator' mapping # This bypasses xfconf-query entirely and drops settings directly into storage
if command -v update-alternatives >/dev/null 2>&1; then
if [ -f "/usr/share/applications/alacritty.desktop" ] || [ -f "/usr/local/share/applications/alacritty.desktop" ]; then
sudo update-alternatives --set x-terminal-emulator $(which alacritty) 2>/dev/null || true
fi
fi
# 5. Pre-seed Xfconf properties directly into the XML tree file structure
# Since xfconfd might not be running yet, we write the raw file backup structure directly
XFCONF_DIR="$HOME/.config/xfce4/xfconf/xfce-perchannel-xml" XFCONF_DIR="$HOME/.config/xfce4/xfconf/xfce-perchannel-xml"
mkdir -p "$XFCONF_DIR" mkdir -p "$XFCONF_DIR"
# Pre-populate the session XML so xfce skips selection entirely on first boot
cat <<EOF > "$XFCONF_DIR/xfce4-session.xml" cat <<EOF > "$XFCONF_DIR/xfce4-session.xml"
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-session" version="1.0"> <channel name="xfce4-session" version="1.0">
@@ -162,8 +155,8 @@ EOF
</channel> </channel>
EOF EOF
color_green "XFCE default terminal configurations written directly to persistent user storage!" color_green "XFCE terminal presets dropped into user skeleton profiles successfully."
fi
fi fi
pause_if_debug pause_if_debug