add scripts

This commit is contained in:
2025-11-30 14:30:15 -08:00
parent 89c175571d
commit 63b2e693bf
2 changed files with 60 additions and 0 deletions

View File

@@ -143,6 +143,14 @@ if is_linux; then
log_info "Installing xload"
install_package xload x11-apps xorg-xload
fi
# XDM display manager
if command_exists xdm; then
log_success "xdm already installed"
else
log_info "Installing xdm"
install_package xdm
fi
fi
# Install TPM (Tmux Plugin Manager)

52
scripts/update-xdm.sh Executable file
View File

@@ -0,0 +1,52 @@
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/common.sh"
log_info "Updating XDM configuration"
if ! is_linux; then
log_error "XDM is only available on Linux"
exit 1
fi
# Determine XDM config directory based on distro
if [ -d "/etc/X11/xdm" ]; then
XDM_DIR="/etc/X11/xdm"
elif [ -d "/etc/xdm" ]; then
XDM_DIR="/etc/xdm"
else
log_error "XDM config directory not found"
log_info "Expected /etc/X11/xdm or /etc/xdm"
exit 1
fi
CONFIG_SOURCE="$SCRIPT_DIR/../config/xdm"
if [ ! -d "$CONFIG_SOURCE" ]; then
log_error "Source XDM config not found at $CONFIG_SOURCE"
exit 1
fi
log_info "Copying XDM configuration from $CONFIG_SOURCE to $XDM_DIR"
# Copy files
for file in Xresources Xsetup Xstartup; do
if [ -f "$CONFIG_SOURCE/$file" ]; then
log_info "Copying $file"
maybe_sudo cp "$CONFIG_SOURCE/$file" "$XDM_DIR/$file"
# Make scripts executable
if [ "$file" = "Xsetup" ] || [ "$file" = "Xstartup" ]; then
maybe_sudo chmod +x "$XDM_DIR/$file"
fi
else
log_warn "$file not found in $CONFIG_SOURCE"
fi
done
log_success "XDM configuration updated"
log_info ""
log_info "To apply changes, restart XDM:"
log_info " sudo systemctl restart xdm"