Files
Pathfinder 1cd8d26d01 XFCE on SDDM; menu defaults to none for DE and TWM
- XFCE module installs/enables sddm instead of lightdm; one greeter across
  every session choice, no lightdm left anywhere.
- Interactive menus now default to 'none' for both DE and TWM (press Enter
  for no DE / no TWM). none+none is still refused by the existing guard.
- README and session.sh comments updated to match.
2026-10-27 11:06:50 +01:00

51 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
set -uo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=../../lib/common.sh
source "$HERE/../../lib/common.sh"
# shellcheck source=../../lib/session.sh
source "$HERE/../../lib/session.sh"
if is_debug; then set +e; else set -e; fi
step "Desktop environment: XFCE"
rule
if pkg_installed xfce4-session; then
ok "XFCE already installed."
else
info "Installing the XFCE desktop..."
install_group_any xfce-desktop xfce-desktop-environment
install_optional "@xfce-extra-plugins"
fi
# XFCE is X11. It needs an X server present even when it is only the session
# provider for chadwm.
install_packages xorg-x11-server-Xorg xorg-x11-xinit
# XFCE runs fine under SDDM too — unify on SDDM so every session has one greeter
if ! pkg_installed sddm; then
install_packages sddm
fi
switch_display_manager sddm
install_nerd_font JetBrainsMono
install_packages alacritty dconf
# Point XFCE's terminal preference at alacritty, seeding the config directly so
# it applies on first login rather than needing a session restart.
XFCONF_DIR="$HOME/.config/xfce4/xfconf/xfce-perchannel-xml"
mkdir -p "$XFCONF_DIR"
info "Seeding XFCE session defaults..."
cat > "$XFCONF_DIR/xfce4-session.xml" <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-session" version="1.0">
<property name="general" type="empty">
<property name="TerminalEmulator" type="string" value="alacritty"/>
</property>
</channel>
EOF
ok "XFCE setup complete."