Files
.dotfiles/setup.sh
2026-01-09 01:10:49 +01:00

39 lines
981 B
Bash
Executable File

#!/usr/bin/env bash
set -e
DOTFILES_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
if ! command -v yay &>/dev/null; then
echo "Installing yay"
sudo pacman -S base-devel git --needed --noconfirm
TEMP_DIR=$(mktemp -d)
git clone https://aur.archlinux.org/yay-bin.git $TEMP_DIR/yay-bin
cd $TEMP_DIR/yay-bin
makepkg -si --noconfirm
fi
echo "Installing packages"
sudo -v || exit 1
yay -S --noconfirm --needed - <$DOTFILES_DIR/packages.txt
echo "Changing default shell"
sudo chsh -s /bin/zsh $USER
echo "Setting nautilus as default file manager"
xdg-mime default org.gnome.nautilus.desktop inode/directory
echo "Setting default git branch to \"main\""
git config --global init.defaultBranch main
echo "Applying arrpc fix"
sudo cp /usr/lib/systemd/user/arrpc.service /etc/systemd/system/arrpc.service
sudo systemctl enable arrpc --now
echo "Applying stow"
cd $DOTFILES_DIR
stow fastfetch fuzzel ghostty godot hyfetch kvantum mangohud niri nvim qt6ct zsh