56 lines
2.3 KiB
Bash
Executable File
56 lines
2.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# A script to install all the software and tools for the dotfiles environment.
|
|
|
|
echo "--- Starting Environment Setup ---"
|
|
|
|
# --- 1. Install Core Packages with APT ---
|
|
echo "--> Installing core packages with apt..."
|
|
sudo apt update
|
|
sudo apt install -y build-essential curl git zsh ripgrep btop bat zoxide eza fuse3 sshfs gh
|
|
|
|
# --- 2. Install Oh My Zsh and Required Plugins (Non-interactive) ---
|
|
if [ ! -d "$HOME/.oh-my-zsh" ]; then
|
|
echo "--> Installing Oh My Zsh..."
|
|
# The --unattended flag runs the installer without prompts
|
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
|
|
|
echo "--> Installing OMZ plugins (P10k, Autosuggestions, Syntax Highlighting)..."
|
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
|
else
|
|
echo "--> Oh My Zsh already installed. Skipping."
|
|
fi
|
|
|
|
# --- 3. Install Rust and Cargo ---
|
|
if ! command -v cargo &> /dev/null; then
|
|
echo "--> Installing Rust and Cargo..."
|
|
# The -y flag answers "yes" to the default installation prompt
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
# Add cargo to the current session's PATH
|
|
source "$HOME/.cargo/env"
|
|
else
|
|
echo "--> Rust/Cargo already installed. Skipping."
|
|
fi
|
|
|
|
# --- 4. Install Tools with Cargo ---
|
|
echo "--> Installing Cargo packages (atuin, zellij, starship, etc.)..."
|
|
cargo install atuin zellij dua-cli navi tealdeer starship yazi-fm
|
|
|
|
# --- 5. Install FZF ---
|
|
if [ ! -d "$HOME/.fzf" ]; then
|
|
echo "--> Installing FZF..."
|
|
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
|
|
# The --all flag answers "yes" to all installer questions
|
|
~/.fzf/install --all
|
|
else
|
|
echo "--> FZF already installed. Skipping."
|
|
fi
|
|
|
|
echo "--- Software installation complete! ---"
|
|
echo "Next steps:"
|
|
echo "1. Run 'chsh -s $(which zsh)' to set Zsh as your default shell."
|
|
echo "2. Run the 'manage_configs.sh' script to symlink your configuration files."
|
|
echo "3. Log out and log back in for all changes to take effect."
|