#!/bin/bash # run_once_20-install-desktop.sh # Hyprland and other DE/shell packages set -euo pipefail warn() { echo ">>> [desktop] WARNING: $*" >&2; } SYS="{{ .system | default "desktop" }}" DISTRO_ID="{{ .chezmoi.osRelease.id | default "" }}" SRC="{{ .chezmoi.sourceDir }}" dmsPlugins=( quickCapture timer calculator dankKDEConnect emojiLauncher ) if [ "$SYS" = "server" ]; then echo ">>> [desktop] system=server, skipping" exit 0 fi case "$DISTRO_ID" in arch) echo ">>> [desktop] arch, system=$SYS" # System packages sudo pacman -Syu --noconfirm --needed \ noto-fonts noto-fonts-cjk noto-fonts-emoji ttf-font-awesome nerd-fonts \ pipewire wireplumber pipewire-alsa pipewire-audio pipewire-jack \ pipewire-pulse gst-plugin-pipewire qt6-multimedia \ network-manager-applet \ bluez bluez-utils blueman gnome-bluetooth-3.0 \ cups cups-pdf cups-pk-helper \ qt5ct qt6ct \ papirus-icon-theme breeze-cursors adw-gtk-theme \ ddcutil playerctl libnotify mediainfo \ fprintd kimageformats \ kdeconnect loupe dosfstools gnome-disk-utility \ cava guvcview tesseract tesseract-data-eng \ cliphist wl-clipboard tesseract zbar imagemagick img2pdf \ xdg-desktop-portal-hyprland gnome-keyring \ hyprland greetd ghostty # Dank Shell - sed workaround to pass args to installer echo ">>> [desktop] installing shell" sudo -v && curl -fsSL https://install.danklinux.com | sed 's#\./installer$#./installer "$@"#' | sh -s -- -c hyprland -t ghostty --include-deps dms-greeter,danksearch,dankcalendar -y echo ">>> [desktop] installing shell-plugins" for pl in "${dmsPlugins[@]}"; do if dms plugins install "$pl"; then echo "✓ $pl: installed" else echo "✗ $pl: failed" fi done # Apply dconf defaults DCONF_INI="$SRC/assets/dconf_gtk.ini" if [ -f "$DCONF_INI" ]; then echo ">>> [desktop] applying GNOME interface defaults" dconf load /org/gnome/desktop/interface/ < "$DCONF_INI" \ || warn "dconf load failed (DBus session may be unavailable)" fi # Theming echo ">>> [desktop] applying themes" pipx install pywalfox || warn "pipx install pywalfox failed" ~/.local/bin/pywalfox install || warn "pywalfox install failed (Firefox may not be configured)" mkdir -p ~/.cache/wal touch ~/.cache/wal/dank-pywalfox.json ln -sf ~/.cache/wal/dank-pywalfox.json ~/.cache/wal/colors.json ;; ubuntu) echo ">>> [desktop] ubuntu, system=$SYS" sudo apt-get install -y \ kdeconnect dosfstools gnome-disk-utility \ cava ddcutil guvcview ;; *) echo ">>> [desktop] unsupported distro: ${DISTRO_ID:-unknown}, skipping" exit 0 ;; esac echo ">>> [desktop] done"