From 636c31bf9e526e0f7f6f42d09711f8e607fbcbf6 Mon Sep 17 00:00:00 2001 From: rootiest Date: Sun, 26 Apr 2026 03:27:10 -0400 Subject: [PATCH] feat: auto-bootstrap Fisher and Catppuccin theme on first launch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a Fisher install prompt to config.fish so new installs require only cloning the repo — plugins and theme are applied automatically on first shell open. Simplify README installation steps accordingly. Co-Authored-By: Claude Sonnet 4.6 --- README.md | 9 ++------- config.fish | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c5953d0..7068160 100644 --- a/README.md +++ b/README.md @@ -433,15 +433,10 @@ mv ~/.config/fish ~/.config/fish.bak # Clone this repo git clone https://git.rootiest.dev/rootiest/fish-config.git ~/.config/fish - -# Install Fisher and plugins -curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source -fisher update - -# Apply the Catppuccin Mocha theme -fish_config theme save "Catppuccin Mocha" ``` +Then open a new Fish shell — Fisher and all plugins will be installed automatically on first launch, and the Catppuccin Mocha theme will be applied. + A [chezmoi](https://www.chezmoi.io/) dotfile manager is also configured — secrets are sourced from `~/.config/.user-dots/fish/secrets.fish` and excluded from version control. --- diff --git a/config.fish b/config.fish index 8bb6065..1e512aa 100644 --- a/config.fish +++ b/config.fish @@ -17,6 +17,21 @@ if test -f /usr/share/cachyos-fish-config/cachyos-config.fish end set --erase _fname +# ──────────────────────────── Bootstrap Fisher ────────────────────────── +if not type -q fisher + echo "Fisher plugin manager not found." + read -l -P "Install Fisher and plugins now? [Y/n] " _fisher_reply + if test -z "$_fisher_reply" -o "$_fisher_reply" = Y -o "$_fisher_reply" = y + echo "Installing Fisher..." + curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source + fisher update + fish_config theme choose "Catppuccin Mocha" + else + echo "Skipping Fisher install. Some features may be unavailable." + end + set --erase _fisher_reply +end + # ───────────────────────── Source user secrets ────────────────────────── if test -f $HOME/.config/.user-dots/fish/secrets.fish source $HOME/.config/.user-dots/fish/secrets.fish