updated scripts: better warn messages, added/updated dotfiles
This commit is contained in:
@@ -1,20 +1,24 @@
|
||||
#!/bin/bash
|
||||
# run_once_20-install-gui.sh
|
||||
# run_once_20-install-desktop.sh
|
||||
# Hyprland and other DE/shell packages
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
SYS="{{ .system | default "desktop" }}"
|
||||
DISTRO_ID="{{ .chezmoi.osRelease.id | default "" }}"
|
||||
SRC="{{ .chezmoi.sourceDir }}"
|
||||
|
||||
if [ "$SYS" = "server" ]; then
|
||||
echo ">>> [gui] system=server, skipping"
|
||||
echo ">>> [desktop] system=server, skipping"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
warn() { echo ">>> [desktop] WARNING: $*" >&2; }
|
||||
|
||||
case "$DISTRO_ID" in
|
||||
arch)
|
||||
echo ">>> [gui] arch, system=$SYS"
|
||||
echo ">>> [desktop] arch, system=$SYS"
|
||||
|
||||
# System packages
|
||||
sudo pacman -Syu --noconfirm --needed \
|
||||
@@ -36,25 +40,34 @@ case "$DISTRO_ID" in
|
||||
|
||||
# Dank Shell - sed workaround to pass args to installer
|
||||
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
|
||||
|
||||
# Apply dconf defaults
|
||||
DCONF_INI="$SRC/assets/dconf_gtk.ini"
|
||||
if [ -f "$DCONF_INI" ]; then
|
||||
echo ">>> [desktop] applying GNOME interface defaults (dconf load)"
|
||||
dconf load /org/gnome/desktop/interface/ < "$DCONF_INI" \
|
||||
|| warn "dconf load failed (DBus session may be unavailable)"
|
||||
fi
|
||||
|
||||
# Firefox theming
|
||||
pipx install pywalfox
|
||||
~/.local/bin/pywalfox install
|
||||
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 ">>> [gui] ubuntu, system=$SYS"
|
||||
echo ">>> [desktop] ubuntu, system=$SYS"
|
||||
sudo apt-get install -y \
|
||||
kdeconnect dosfstools gnome-disk-utility \
|
||||
cava ddcutil guvcview
|
||||
;;
|
||||
|
||||
*)
|
||||
echo ">>> [gui] unsupported distro: ${DISTRO_ID:-unknown}, skipping"
|
||||
echo ">>> [desktop] unsupported distro: ${DISTRO_ID:-unknown}, skipping"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ">>> [gui] done"
|
||||
echo ">>> [desktop] done"
|
||||
|
||||
Reference in New Issue
Block a user