install.sh: add Fedora dependency installation

This commit is contained in:
Jonas H
2026-02-27 22:58:04 +01:00
parent 074701f983
commit 306aced396

View File

@@ -1,14 +1,66 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# install.sh: Stow all packages in this dotfiles repo. # install.sh: Install dependencies and stow all packages.
# Run this after cloning on a new machine. # Run this after cloning on a new machine.
set -euo pipefail set -euo pipefail
DOTFILES_DIR="$(cd "$(dirname "$0")" && pwd)" DOTFILES_DIR="$(cd "$(dirname "$0")" && pwd)"
# ---------------------------------------------------------------------------
# Dependencies (Fedora)
# ---------------------------------------------------------------------------
DNF_PACKAGES=(
stow
# sway ecosystem
autotiling
swayidle
# bar & notifications
mako
libnotify # notify-send
# terminal & launcher
fuzzel
# audio & display
wireplumber # wpctl
pipewire-utils # pactl
brightnessctl
alsa-utils # speaker-test
# screen recording
wf-recorder
slurp
zenity
ffmpeg # needs RPM Fusion: https://rpmfusion.org
# misc
jq
firefox
)
echo "Installing dnf packages..."
sudo dnf install -y "${DNF_PACKAGES[@]}"
# ---------------------------------------------------------------------------
# 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"
fi
}
warn_missing eww "install from https://github.com/elkowar/eww/releases"
warn_missing wezterm "install from https://wezfurlong.org/wezterm/install/linux.html"
# ---------------------------------------------------------------------------
# Stow all packages
# ---------------------------------------------------------------------------
echo ""
echo "Stowing dotfiles..."
for PACKAGE in "$DOTFILES_DIR"/*/; do for PACKAGE in "$DOTFILES_DIR"/*/; do
PACKAGE="$(basename "$PACKAGE")" PACKAGE="$(basename "$PACKAGE")"
echo "Stowing: $PACKAGE" echo " $PACKAGE"
stow --dir="$DOTFILES_DIR" --target="$HOME" --restow "$PACKAGE" stow --dir="$DOTFILES_DIR" --target="$HOME" --restow "$PACKAGE"
done done