Splits setup.sh into lib/common.sh, lib/session.sh and seven modules (3 DE, 4 TWM). Targets a bare Fedora 44+ install. Fixes carried over from the first build: - DEBUG_MODE was unbound under set -u, aborting the script at the version banner - mangled 'echohttps://...' line left over from the starburst split - set -e was missing entirely; --debug flag parsing restored - unguarded 'clear' aborted the run without TERM - $PRETTY_NAME unguarded under set -u - modules were sourced, leaking shell options into the parent - Flathub added twice (system-wide + per-user) - no dnf5-plugins check before using 'dnf config-manager' - no Fedora release gate - /usr/share/xsessions assumed to exist when writing session entries
51 lines
1.4 KiB
Bash
Executable File
51 lines
1.4 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's native greeter is lightdm
|
|
if ! pkg_installed lightdm; then
|
|
install_packages lightdm
|
|
fi
|
|
switch_display_manager lightdm
|
|
|
|
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."
|