The configs (wezterm.lua font, starship symbols, eza icons) assume 'JetBrainsMono Nerd Font', which was an Arch package in the old setup. Ubuntu's fonts-jetbrains-mono is the plain family without Nerd glyphs, so WezTerm fell back to a default font and warned on every launch. lib/fonts.sh downloads the official nerd-fonts release tarball into ~/.local/share/fonts/JetBrainsMonoNerdFont and runs fc-cache. Skips if fc-list already reports the family. fontconfig added to the apt base list for fc-list/fc-cache.
82 lines
2.2 KiB
Bash
Executable file
82 lines
2.2 KiB
Bash
Executable file
#!/bin/bash
|
|
# Pop!_OS / Ubuntu installer for these dotfiles.
|
|
#
|
|
# What it does (idempotent — safe to re-run):
|
|
# 1. apt: system base (zsh, git, curl, build-essential, wl-clipboard).
|
|
# 2. Vendor apt repos: WezTerm, Brave Beta (GUI apps stay on apt).
|
|
# 3. Homebrew + Brewfile: fzf, fd, bat, eza, zoxide, ripgrep, tmux,
|
|
# neovim, lazygit, starship, gh, zsh plugins — always latest,
|
|
# updated later with a single `brew upgrade`.
|
|
# 4. nvm + tmux plugin manager (tpm).
|
|
# 5. Symlinks dotfiles into ~ and ~/.config.
|
|
# 6. Switches login shell to zsh.
|
|
#
|
|
# Usage:
|
|
# install/install.sh Full install
|
|
# install/install.sh --packages-only Only packages/tools (apt + brew)
|
|
# install/install.sh --dotfiles-only Only link dotfiles + tpm/nvm + chsh
|
|
# install/install.sh --help
|
|
|
|
set -eEo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
source "$SCRIPT_DIR/lib/common.sh"
|
|
source "$SCRIPT_DIR/lib/packages.sh"
|
|
source "$SCRIPT_DIR/lib/brew.sh"
|
|
source "$SCRIPT_DIR/lib/extras.sh"
|
|
source "$SCRIPT_DIR/lib/fonts.sh"
|
|
source "$SCRIPT_DIR/lib/dotfiles.sh"
|
|
|
|
usage() {
|
|
sed -n '2,18p' "${BASH_SOURCE[0]}" | sed 's/^# \{0,1\}//'
|
|
}
|
|
|
|
MODE=all
|
|
for arg in "$@"; do
|
|
case $arg in
|
|
--packages-only) MODE=packages ;;
|
|
--dotfiles-only) MODE=dotfiles ;;
|
|
-h|--help) usage; exit 0 ;;
|
|
*) die "Unknown argument: $arg (try --help)" ;;
|
|
esac
|
|
done
|
|
|
|
preflight() {
|
|
command -v apt-get >/dev/null 2>&1 || die "apt-get not found — this installer targets Debian/Ubuntu/Pop!_OS."
|
|
((EUID != 0)) || die "Do not run as root; run as your regular user."
|
|
require_cmd sudo
|
|
require_cmd curl
|
|
}
|
|
|
|
main() {
|
|
preflight
|
|
|
|
case $MODE in
|
|
packages)
|
|
install_all_packages
|
|
install_brew_packages
|
|
install_all_extras
|
|
install_nerd_font
|
|
;;
|
|
dotfiles)
|
|
link_dotfiles
|
|
install_tpm
|
|
install_nvm
|
|
set_zsh_as_shell
|
|
;;
|
|
all)
|
|
install_all_packages
|
|
install_brew_packages
|
|
install_all_extras
|
|
install_nerd_font
|
|
link_dotfiles
|
|
set_zsh_as_shell
|
|
;;
|
|
esac
|
|
|
|
info "Done. Open a new shell (or log out + back in) to pick up the new login shell."
|
|
info "First tmux launch: prefix + I to fetch tpm plugins."
|
|
info "Keep tools current with: brew upgrade && sudo apt upgrade"
|
|
}
|
|
|
|
main
|