#!/bin/bash # A script to install all software for the dotfiles environment. echo "--- Starting Environment Setup ---" # 1. Install core packages with apt # Added: xclip, jq, pandoc 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 xclip jq pandoc # 2. Install Oh My Zsh and required plugins if [ ! -d "$HOME/.oh-my-zsh" ]; then echo "--> Installing Oh My Zsh and plugins..." sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended 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 fi # 3. Install Rust and Cargo if ! command -v cargo &> /dev/null; then echo "--> Installing Rust and Cargo..." curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source "$HOME/.cargo/env" fi # 4. Install tools with Cargo echo "--> Installing Cargo packages..." 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 ~/.fzf/install --all fi # 6. Install Lazygit if ! command -v lazygit &> /dev/null; then echo "--> Installing Lazygit..." LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": *"v\K[^"]*') curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" tar xf lazygit.tar.gz lazygit sudo install lazygit /usr/local/bin rm lazygit lazygit.tar.gz fi echo "--- Software installation complete! ---"