use official starlink install

This commit is contained in:
Jonas H
2026-03-07 22:27:28 +01:00
parent 5396c96fbe
commit 4542b5f48a

View File

@@ -30,8 +30,6 @@ case "$DISTRO" in
# EndeavourOS is Arch-based, use pacman
PACMAN_PACKAGES=(
stow
# prompt
starship
# sway ecosystem
swayidle
# bar & notifications
@@ -61,8 +59,6 @@ case "$DISTRO" in
fedora)
DNF_PACKAGES=(
stow
# prompt
starship
# sway ecosystem
swayidle
# bar & notifications
@@ -92,8 +88,6 @@ case "$DISTRO" in
arch)
PACMAN_PACKAGES=(
stow
# prompt
starship
# sway ecosystem
swayidle
# bar & notifications
@@ -115,11 +109,11 @@ case "$DISTRO" in
jq
firefox
)
echo "Installing packages for Arch Linux..."
sudo pacman -S --noconfirm "${PACMAN_PACKAGES[@]}"
;;
*)
echo "ERROR: Unsupported distribution: $DISTRO"
echo "Supported distributions: fedora, arch, endeavouros"
@@ -128,13 +122,13 @@ case "$DISTRO" in
esac
# ---------------------------------------------------------------------------
# Packages not in Fedora repos install manually if missing
# Packages not in Fedora repos - install manually if missing
# ---------------------------------------------------------------------------
warn_missing() {
local cmd="$1" msg="$2"
if ! command -v "$cmd" &>/dev/null; then
echo "WARNING: '$cmd' not found $msg"
echo "WARNING: '$cmd' not found - $msg"
fi
}
@@ -142,6 +136,19 @@ warn_missing autotiling "install via pip: pip install --user autotiling"
warn_missing eww "install from https://github.com/elkowar/eww/releases"
warn_missing wezterm "install from https://wezfurlong.org/wezterm/install/linux.html"
# ---------------------------------------------------------------------------
# Starship
# ---------------------------------------------------------------------------
if ! command -v starship &>/dev/null; then
echo ""
echo "Installing Starship..."
curl -sS https://starship.rs/install.sh | sh
else
echo ""
echo "Starship already installed, skipping."
fi
# ---------------------------------------------------------------------------
# NPM packages
# ---------------------------------------------------------------------------
@@ -201,15 +208,15 @@ echo "Stowing dotfiles..."
CONFLICTS=()
for PACKAGE in "$DOTFILES_DIR"/*/; do
PACKAGE="$(basename "$PACKAGE")"
# Skip hidden directories and .git
[[ "$PACKAGE" == .* ]] && continue
# Check if package has files that would conflict
while IFS= read -r -d '' dotfile; do
# Get the target path this would create
TARGET_PATH="${HOME}/${dotfile#$DOTFILES_DIR/$PACKAGE/}"
# If target exists and is NOT a symlink to the correct location, it's a conflict
if [[ -e "$TARGET_PATH" ]] && [[ ! -L "$TARGET_PATH" ]]; then
CONFLICTS+=("$PACKAGE (file: $TARGET_PATH)")
@@ -228,10 +235,10 @@ fi
# Stow all packages
for PACKAGE in "$DOTFILES_DIR"/*/; do
PACKAGE="$(basename "$PACKAGE")"
# Skip hidden directories
[[ "$PACKAGE" == .* ]] && continue
echo " $PACKAGE"
stow --dir="$DOTFILES_DIR" --target="$HOME" --restow "$PACKAGE"
done