Update something
This commit is contained in:
parent
e3c94cce54
commit
147ca5ddbc
81 changed files with 3055 additions and 326 deletions
138
setup.sh
138
setup.sh
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
cat << EOF
|
||||
cat <<EOF
|
||||
_________ __ ____ ___
|
||||
/ _____/ _____/ |_| | \______
|
||||
\_____ \_/ __ \ __\ | /\____ \
|
||||
|
@ -12,8 +12,7 @@ cat << EOF
|
|||
|
||||
EOF
|
||||
|
||||
|
||||
CONFIGS="cava kitty dunst fastfetch pacseek hypr hypridle rofi starship tmux waybar yazi"
|
||||
CONFIGS="cava ghostty dunst fastfetch pacseek hypr hypridle rofi starship zellij waybar yazi"
|
||||
BACKUP_DIR="$HOME/.config_backup"
|
||||
LOCAL_BIN="$HOME/.local/bin"
|
||||
FONT_DIR="$HOME/.local/share/fonts"
|
||||
|
@ -22,11 +21,11 @@ DOTS_DIR="$HOME/hyprdots"
|
|||
echo "==> Backing up existing config files..."
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
for dir in $CONFIGS; do
|
||||
if [ -d "$HOME/.config/$dir" ]; then
|
||||
echo "=> Backing up $dir to $BACKUP_DIR"
|
||||
cp -r "$HOME/.config/$dir" "$BACKUP_DIR/$dir"
|
||||
rm -rf "$HOME/.config/$dir"
|
||||
fi
|
||||
if [ -d "$HOME/.config/$dir" ]; then
|
||||
echo "=> Backing up $dir to $BACKUP_DIR"
|
||||
cp -r "$HOME/.config/$dir" "$BACKUP_DIR/$dir"
|
||||
rm -rf "$HOME/.config/$dir"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "==> Copying new config files..."
|
||||
|
@ -53,17 +52,17 @@ mkdir -p "$FA_DIR"
|
|||
|
||||
echo "==> Installing Font Awesome (v5 & v6)..."
|
||||
if [[ ! -f "$FA_DIR/fa-brands-400.ttf" ]]; then
|
||||
wget -q https://use.fontawesome.com/releases/v6.7.2/fontawesome-free-6.7.2-desktop.zip
|
||||
unzip -q fontawesome-free-6.7.2-desktop.zip
|
||||
mv fontawesome-free-6.7.2-desktop/otfs/*.otf "$FA_DIR/"
|
||||
rm -rf fontawesome-free-6.7.2-desktop*
|
||||
|
||||
wget -q https://use.fontawesome.com/releases/v5.15.4/fontawesome-free-5.15.4-desktop.zip
|
||||
unzip -q fontawesome-free-5.15.4-desktop.zip
|
||||
mv fontawesome-free-5.15.4-desktop/otfs/*.otf "$FA_DIR/"
|
||||
rm -rf fontawesome-free-5.15.4-desktop*
|
||||
wget -q https://use.fontawesome.com/releases/v6.7.2/fontawesome-free-6.7.2-desktop.zip
|
||||
unzip -q fontawesome-free-6.7.2-desktop.zip
|
||||
mv fontawesome-free-6.7.2-desktop/otfs/*.otf "$FA_DIR/"
|
||||
rm -rf fontawesome-free-6.7.2-desktop*
|
||||
|
||||
wget -q https://use.fontawesome.com/releases/v5.15.4/fontawesome-free-5.15.4-desktop.zip
|
||||
unzip -q fontawesome-free-5.15.4-desktop.zip
|
||||
mv fontawesome-free-5.15.4-desktop/otfs/*.otf "$FA_DIR/"
|
||||
rm -rf fontawesome-free-5.15.4-desktop*
|
||||
else
|
||||
echo "✔️ Font Awesome already installed, skipping."
|
||||
echo "✔️ Font Awesome already installed, skipping."
|
||||
fi
|
||||
|
||||
# JetBrains Nerd Font Installation
|
||||
|
@ -72,12 +71,12 @@ mkdir -p "$JB_FONT_DIR"
|
|||
|
||||
echo "==> Installing JetBrains Nerd Fonts..."
|
||||
if [[ ! -f "$JB_FONT_DIR/JetBrainsMono-Regular.ttf" ]]; then
|
||||
wget -q https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/JetBrainsMono.zip
|
||||
unzip -q JetBrainsMono.zip -d JetBrainsMono
|
||||
mv JetBrainsMono/*.ttf "$JB_FONT_DIR/"
|
||||
rm -rf JetBrainsMono JetBrainsMono.zip
|
||||
wget -q https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/JetBrainsMono.zip
|
||||
unzip -q JetBrainsMono.zip -d JetBrainsMono
|
||||
mv JetBrainsMono/*.ttf "$JB_FONT_DIR/"
|
||||
rm -rf JetBrainsMono JetBrainsMono.zip
|
||||
else
|
||||
echo "✔️ JetBrains Nerd Font already installed, skipping."
|
||||
echo "✔️ JetBrains Nerd Font already installed, skipping."
|
||||
fi
|
||||
|
||||
echo "==> Refreshing font cache..."
|
||||
|
@ -91,63 +90,74 @@ mkdir -p ~/Pictures/Wallpaper
|
|||
|
||||
# Install yay if not already installed
|
||||
if ! command -v yay &>/dev/null; then
|
||||
echo "==> Installing AUR package manager (yay)..."
|
||||
sudo pacman -S --needed git base-devel || { echo "❌ Failed to install base-devel"; exit 1; }
|
||||
git clone https://aur.archlinux.org/yay.git ~/yay && cd ~/yay && makepkg -si || { echo "❌ yay installation failed"; exit 1; }
|
||||
cd ~
|
||||
echo "==> Installing AUR package manager (yay)..."
|
||||
sudo pacman -S --needed git base-devel || {
|
||||
echo "❌ Failed to install base-devel"
|
||||
exit 1
|
||||
}
|
||||
git clone https://aur.archlinux.org/yay.git ~/yay && cd ~/yay && makepkg -si || {
|
||||
echo "❌ yay installation failed"
|
||||
exit 1
|
||||
}
|
||||
cd ~
|
||||
else
|
||||
echo "✔️ yay is already installed."
|
||||
echo "✔️ yay is already installed."
|
||||
fi
|
||||
|
||||
# Install useful packages from pacman and AUR
|
||||
echo "==> Installing core packages..."
|
||||
yay -S --noconfirm \
|
||||
pacseek \
|
||||
zoxide \
|
||||
fzf \
|
||||
unzip \
|
||||
zsh \
|
||||
starship \
|
||||
atuin \
|
||||
eza \
|
||||
acpi \
|
||||
playerctl \
|
||||
zsh-autosuggestions \
|
||||
zsh-syntax-highlighting \
|
||||
zsh-history-substring-search
|
||||
pacseek \
|
||||
zoxide \
|
||||
fzf \
|
||||
unzip \
|
||||
ghostty \
|
||||
ghostty-terminfo \
|
||||
ghostty-shell-integration \
|
||||
zsh \
|
||||
starship \
|
||||
atuin \
|
||||
zellij \
|
||||
eza \
|
||||
acpi \
|
||||
playerctl \
|
||||
zsh-autosuggestions \
|
||||
zsh-syntax-highlighting \
|
||||
zsh-history-substring-search
|
||||
|
||||
sudo pacman -S --noconfirm \
|
||||
dunst \
|
||||
libnotify \
|
||||
waybar \
|
||||
wl-clipboard \
|
||||
xdg-desktop-portal-hyprland \
|
||||
xdg-desktop-portal \
|
||||
brightnessctl \
|
||||
pavucontrol \
|
||||
tmux \
|
||||
slurp \
|
||||
grim \
|
||||
hyprlock \
|
||||
pamixer
|
||||
dunst \
|
||||
libnotify \
|
||||
waybar \
|
||||
wl-clipboard \
|
||||
xdg-desktop-portal-hyprland \
|
||||
xdg-desktop-portal \
|
||||
brightnessctl \
|
||||
pavucontrol \
|
||||
tmux \
|
||||
slurp \
|
||||
grim \
|
||||
hyprlock \
|
||||
pamixer
|
||||
|
||||
# Set zsh as default shell if not already
|
||||
if [[ "$SHELL" != "$(which zsh)" ]]; then
|
||||
echo "==> Changing default shell to zsh..."
|
||||
chsh -s "$(which zsh)"
|
||||
echo "==> Changing default shell to zsh..."
|
||||
chsh -s "$(which zsh)"
|
||||
fi
|
||||
|
||||
# Ensure Zsh plugins and tools are sourced in .zshrc
|
||||
ZSHRC="$HOME/.zshrc"
|
||||
echo "==> Configuring Zsh plugins and tools..."
|
||||
{
|
||||
echo -e "\n# Zsh Plugins and Tools"
|
||||
echo "source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
echo "source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
echo "source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh"
|
||||
echo 'eval "$(zoxide init zsh)"'
|
||||
echo 'eval "$(atuin init zsh)"'
|
||||
echo 'eval "$(starship init zsh)"'
|
||||
} >> "$ZSHRC"
|
||||
echo -e "\n# Zsh Plugins and Tools"
|
||||
echo "source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
echo "source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
echo "source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh"
|
||||
echo 'eval "$(zoxide init zsh)"'
|
||||
echo 'eval "$(atuin init zsh)"'
|
||||
echo 'eval "$(zellij setup --generate-auto-start zsh)"'
|
||||
echo 'eval "$(starship init zsh)"'
|
||||
} >>"$ZSHRC"
|
||||
|
||||
echo -e "\n✅ All packages and Zsh plugins configured successfully!"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue