hypr overhaul

This commit is contained in:
2026-09-20 14:40:45 +02:00
parent 85fc7f0e4a
commit 384cd84a6e
10 changed files with 215 additions and 58 deletions
+45
View File
@@ -0,0 +1,45 @@
# ---------------------------------------------------------------------------
# Terminal package list for term/setup.sh
#
# Maintenance:
# - Add / remove packages on separate lines.
# - Lines starting with '#' and blank lines are ignored.
# - Use "@pacman", "@aur" or "@npm" markers to switch section.
# - The default section is @pacman.
# ---------------------------------------------------------------------------
@pacman
fish
extra/kitty
neovim
openssh
rclone
rsync
unison
stow
nodejs
npm
starship
fastfetch
tree-sitter-cli
python
python-pip
unzip
ruff
python-ruff
python-debugpy
chromium
selene
tmux
yazi
zoxide
fzf
locate
ttf-jetbrains-mono-nerd
ttf-font-awesome
@aur
opencode
@npm
eslint_d
+121
View File
@@ -0,0 +1,121 @@
#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PACKAGES_FILE="$SCRIPT_DIR/packages.txt"
# ---------------------------------------------------------------------------
# Read packages.txt, split into pacman / aur / npm sections.
# ---------------------------------------------------------------------------
read_packages() {
local section="pacman"
local current
current=""
while IFS= read -r line || [[ -n "$line" ]]; do
current="${line%%#*}"
current="${current##*( )}"
current="${current%%*( )}"
[[ -z "$current" ]] && continue
case "$current" in
@pacman) section="pacman" ;;
@aur) section="aur" ;;
@npm) section="npm" ;;
*)
case "$section" in
pacman) pacman_pkgs+=("$current") ;;
aur) aur_pkgs+=("$current") ;;
npm) npm_pkgs+=("$current") ;;
esac
;;
esac
done < "$PACKAGES_FILE"
}
declare -a pacman_pkgs=() aur_pkgs=() npm_pkgs=()
# ---------------------------------------------------------------------------
# Install sections.
# ---------------------------------------------------------------------------
install_pacman() {
if ((${#pacman_pkgs[@]})); then
echo "==> Installiere Pacman-Pakete: ${pacman_pkgs[*]}"
yay -S --needed "${pacman_pkgs[@]}"
fi
}
install_aur() {
if ((${#aur_pkgs[@]})); then
echo "==> Installiere AUR-Pakete: ${aur_pkgs[*]}"
yay -S --needed "${aur_pkgs[@]}"
fi
}
install_npm() {
if ((${#npm_pkgs[@]})); then
echo "==> Installiere globale npm-Pakete: ${npm_pkgs[*]}"
# Arch installiert npm nach /usr/lib/node_modules (root-owned),
# daher braucht der globale Install sudo.
sudo npm install -g "${npm_pkgs[@]}"
fi
}
# ---------------------------------------------------------------------------
# Post-install configuration.
# ---------------------------------------------------------------------------
set_fish_default_shell() {
if command -v fish >/dev/null 2>&1; then
if [[ "$SHELL" != "/usr/bin/fish" ]]; then
echo "Setze fish als Standard-Shell ..."
chsh -s /usr/bin/fish
else
echo "fish ist bereits die Standard-Shell."
fi
else
echo "Warnung: fish wurde nicht installiert; ueberspringe chsh."
fi
}
install_tmuxifier() {
if [[ -d "$HOME/.tmuxifier" ]]; then
echo "tmuxifier bereits installiert; fahre fort."
else
echo "Klone tmuxifier ..."
git clone https://github.com/jimeh/tmuxifier.git "$HOME/.tmuxifier"
fi
}
add_yazi_git_plugin() {
if command -v yazi >/dev/null 2>&1 && command -v ya >/dev/null 2>&1; then
if ya pkg list 2>/dev/null | grep -q 'yazi-rs/plugins:git'; then
echo "yazi git-Plugin bereits installiert; fahre fort."
else
echo "Fuege yazi git-Plugin hinzu ..."
ya pkg add yazi-rs/plugins:git
fi
fi
}
# ---------------------------------------------------------------------------
# Main
# ---------------------------------------------------------------------------
main() {
# Hinweis: multilib, yay und das System-Update werden von
# basic/setup.sh uebernommen (laeuft vor term im Makefile).
echo "==> Lese Paketliste: $PACKAGES_FILE"
read_packages
install_pacman
install_aur
install_npm
set_fish_default_shell
install_tmuxifier
add_yazi_git_plugin
echo "==> Aktualisiere locate-Datenbank ..."
sudo updatedb
echo "Fertig. Starte ein neues Terminal, damit fish und die Umgebung greifen."
}
main