feat: migrate from Zsh to Fish shell with comprehensive configuration

Major shell migration replacing Zsh/Oh-My-Zsh with Fish shell:

- Remove all Zsh configurations (dot_zshrc.tmpl, dot_p10k.zsh)
- Remove Oh-My-Zsh external dependencies from .chezmoiexternal.toml
- Add complete Fish shell setup with config.fish.tmpl and abbr.fish.tmpl
- Implement Fish-native functions for lazy-loading tools (mise, pyenv, zoxide, etc.)
- Create commonrc.fish.tmpl for cross-shell compatibility
- Add Fish plugin management via Fisher (tide prompt, fzf.fish)
- Update documentation (CLAUDE.md, TODO.md, ONBOARDING.md) to reflect Fish
- Add .fish.tmpl file association to VS Code settings
- Enhance PowerShell profile with lsd aliases
- Configure git delta pager and zdiff3 merge conflict style
- Update WSL keychain integration for Fish shell

This migration maintains all existing tool integrations while improving
startup performance through lazy-loading and Fish's native features.
This commit is contained in:
2025-10-27 13:37:00 -05:00
parent 4095b2d242
commit 4d914f1e2f
34 changed files with 501 additions and 1864 deletions

View File

@@ -10,6 +10,7 @@
"*.toml.tmpl": "toml",
"*.yaml.tmpl": "yaml",
"*.cfg.tmpl": "ini",
"*.fish.tmpl": "fish",
"*bash_aliases*": "shellscript",
"*dot_profile*": "shellscript",
"*dot_gitconfig*": "ini"

View File

@@ -104,7 +104,7 @@ chezmoi add --encrypt ~/.ssh/config
## Platform Coverage
- **OS**: Windows, Linux (WSL/native), macOS
- **Shells**: bash, zsh, nushell, PowerShell
- **Shells**: bash, fish, nushell, PowerShell
- **Tools**: 30+ development tools configured (pyenv, bun, cargo, etc.)
- **Secrets**: Doppler + age encryption

View File

@@ -10,8 +10,6 @@ When **bolded**, this application won't be installed automatically. It implies t
- [ ] bw
- Semi-required applications
- [ ] **hishtory**
- [ ] **zsh**
- [ ] **oh-my-zsh**
- Preferred applications
- [ ] kitty
- [ ] micro

View File

@@ -54,7 +54,7 @@
- [ ] Consolidate PATH modifications into single, organized section in `commonrc.sh.tmpl`
- [ ] Create modular PATH loading system (one block per tool with conditional checks)
- [ ] Separate PATH, environment variables, and shell completions into logical sections
- [ ] Document load order (`.bashrc` `.zshrc` `commonrc.sh``.bash_aliases`)
- [ ] Document load order (`.bashrc``commonrc.sh``.bash_aliases`)
- [ ] Add comments explaining each tool's PATH modification
- [ ] Eliminate duplicate PATH additions
- [ ] Create standard pattern for conditional tool loading
@@ -69,7 +69,7 @@
- [ ] Move completions to dedicated section (after PATH, before aliases)
- [ ] Add error handling for missing completion files
- [ ] Document which tools provide completions
- [ ] Test completions on bash and zsh
- [ ] Test completions on bash
- [ ] Add completion loading performance optimization
- [ ] Document how to add new tool completions

View File

@@ -1,46 +1,2 @@
[".asdf"]
type = "archive"
url = "https://github.com/asdf-vm/asdf/archive/v0.14.1.tar.gz"
exact = true
stripComponents = 1
refreshPeriod = "168h"
[".oh-my-zsh"]
type = "archive"
url = "https://github.com/ohmyzsh/ohmyzsh/archive/master.tar.gz"
exact = true
stripComponents = 1
refreshPeriod = "72h"
exclude = [
"*/.*",
"*/templates",
"*/themes",
]
[".oh-my-zsh/custom/themes/powerlevel10k"]
type = "archive"
url = "https://github.com/romkatv/powerlevel10k/archive/{{ (gitHubLatestRelease "romkatv/powerlevel10k").TagName }}.tar.gz"
exact = true
stripComponents = 1
refreshPeriod = "72h"
[".oh-my-zsh/custom/plugins/zsh-autosuggestions"]
type = "archive"
url = "https://github.com/zsh-users/zsh-autosuggestions/archive/master.tar.gz"
exact = true
stripComponents = 1
refreshPeriod = "168h"
[".oh-my-zsh/custom/plugins/F-Sy-H"]
type = "archive"
url = "https://github.com/z-shell/F-Sy-H/archive/master.tar.gz"
exact = true
stripComponents = 1
refreshPeriod = "168h"
[".oh-my-zsh/custom/plugins/zoxide"]
type = "archive"
url = "https://github.com/ajeetdsouza/zoxide/archive/master.tar.gz"
exact = true
stripComponents = 1
refreshPeriod = "168h"
# External repositories managed by chezmoi
# https://www.chezmoi.io/reference/special-files-and-directories/chezmoiexternal-format/

View File

@@ -2,25 +2,12 @@ hooks
tool-versions
{{/* generated files, cached files, anything that might change unnecessarily */}}
.oh-my-zsh/cache/**
.oh-my-zsh/plugins/**
.oh-my-zsh/templates/**
.oh-my-zsh/custom/themes/powerlevel10k/**/*.zwc
.asdf/downloads/**
.asdf/installs/**
.asdf/plugins/**
.asdf/shims/**
.asdf/tmp/**
.asdf/repository/**
{{ if eq .chezmoi.os "windows" }}
{{/* Ignore Linux/Unix-only files on Windows */}}
# Shell configs (Linux-only)
.oh-my-zsh
.scripts
*.zsh
.zshrc
.bashrc
.profile
.bash_aliases

View File

@@ -0,0 +1,89 @@
# Fish shell common configuration
# This template provides environment setup for Fish shell
# General configuration
set -gx EDITOR "micro"
set -gx GPG_TTY (tty)
set -gx MICRO_TRUECOLOR 1
set -gx TERM xterm-256color # fixes terminal colors when ssh'ing into laptop
# Authentication
set -gx OPENAI_API_KEY "{{ dopplerProjectJson.OPENAI_CHATGPT_CLI }}"
# hishtory (lazy-loaded via __init_hishtory function)
test -d $HOME/.hishtory && fish_add_path $HOME/.hishtory
# PATH setup
test -d $HOME/bin && fish_add_path $HOME/bin
fish_add_path /usr/local/bin
fish_add_path $HOME/.local/bin
test -d /usr/local/go/bin && fish_add_path /usr/local/go/bin # Go
test -d $HOME/go/bin && fish_add_path $HOME/go/bin # Go-installed tools
test -d $HOME/.local/share/bob/nvim-bin && fish_add_path $HOME/.local/share/bob/nvim-bin # Bob, Neovim package manager
# Deno
if test -d $HOME/.deno
source $HOME/.deno/env.fish 2>/dev/null || set -gx DENO_INSTALL $HOME/.deno && fish_add_path $DENO_INSTALL/bin
end
# Rust (Cargo)
if test -f $HOME/.cargo/env.fish
source $HOME/.cargo/env.fish
else if test -f $HOME/.cargo/env
# Fallback: parse bash env file
set -gx CARGO_HOME $HOME/.cargo
fish_add_path $CARGO_HOME/bin
end
# Homebrew
if test -f /home/linuxbrew/.linuxbrew/bin/brew
eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)
end
set -gx PYENV_ROOT $HOME/.pyenv
# bun
set -gx BUN_INSTALL $HOME/.bun
fish_add_path $BUN_INSTALL/bin
# Note: Bun's _bun file is bash-specific, Fish completions handled separately
# jenv (Java version manager)
if test -d $HOME/.jenv/bin
fish_add_path $HOME/.jenv/bin
if command -q jenv
jenv init - fish | source
end
end
# pnpm
set -gx PNPM_HOME $HOME/.local/share/pnpm
if not contains $PNPM_HOME $PATH
fish_add_path $PNPM_HOME
end
# spicetify
if test -d $HOME/.spicetify
fish_add_path $HOME/.spicetify
end
# pulumi
if test -d $HOME/.pulumi/bin
fish_add_path $HOME/.pulumi/bin
end
# dotnet
if test -d $HOME/.dotnet
set -gx DOTNET_ROOT $HOME/.dotnet
fish_add_path $DOTNET_ROOT
fish_add_path $DOTNET_ROOT/tools
end
# Note: Aliases are defined in Fish-native format in ~/.config/fish/conf.d/abbr.fish
# The bash_aliases file contains bash-specific syntax and is not sourced here
{{- /* WSL-specific settings */ -}}
{{- if .data.wsl }}
## Ensures CLI apps open URLs in the default Windows browser
set -gx BROWSER 'powershell.exe /c start'
{{- end }}

View File

@@ -1,4 +1,4 @@
# This template's argument is the shell as a string (bash, zsh).
# This template's argument is the shell as a string (bash, ...).
# general configuration
export EDITOR="micro"
@@ -13,9 +13,7 @@ export OPENAI_API_KEY="{{ dopplerProjectJson.OPENAI_CHATGPT_CLI }}"
# hishtory
export HISHTORY_SERVER="https://hsh.{{ dopplerProjectJson.PRIVATE_DOMAIN }}"
export PATH="$PATH:$HOME/.hishtory"
{{ if eq .shell "zsh" -}}
source $HOME/.hishtory/config.zsh
{{ else if eq .shell "bash" -}}
{{ if eq .shell "bash" -}}
source $HOME/.hishtory/config.sh
{{- else -}}
{{ fail "Unexpected shell." }}
@@ -63,19 +61,6 @@ if [ -d $HOME/.jenv/bin ]; then
fi
fi
if command -v hass-cli &> /dev/null; then
export HASS_SERVER={{ dopplerProjectJson.HASS_SERVER_URL }}
export HASS_TOKEN={{ dopplerProjectJson.HASS_SERVER_TOKEN }}
{{ if eq .shell "bash" -}}
source <(_HASS_CLI_COMPLETE=bash_source hass-cli)
{{ else if eq .shell "zsh" -}}
source <(_HASS_CLI_COMPLETE=zsh_source hass-cli)
{{ else if eq .shell "fish" -}}
eval (_HASS_CLI_COMPLETE=fish_source hass-cli)
{{ end }}
fi
# pnpm
export PNPM_HOME="$HOME/.local/share/pnpm"
case ":$PATH:" in
@@ -93,7 +78,6 @@ if [ -d "$HOME/.pulumi/bin" ]; then
export PATH=$PATH:$HOME/.pulumi/bin
fi
# load aliases (note: omz aliases are supposed to be placed in ZSH_CUSTOM?)
. $HOME/.bash_aliases
@@ -108,14 +92,4 @@ export BROWSER='powershell.exe /c start'
if [ -d "$HOME/.dotnet" ]; then
export DOTNET_ROOT="$HOME/.dotnet"
export PATH="$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools"
fi
# disable screen blanking
# source $(brew --prefix)/share/zsh/site-functions/_todoist_peco
# xset s off && xset -dpms
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='micro'
# else
# export EDITOR='nvim'
# fi
fi

View File

@@ -21,10 +21,13 @@ Set-Alias -Name nano -Value micro
Set-Alias -Name vim -Value nvim
Set-Alias -Name lg -Value lazygit
# Directory listing
function ll { Get-ChildItem -Force | Format-Table -AutoSize }
function la { Get-ChildItem -Force }
function l { Get-ChildItem }
# Directory listing - lsd (modern ls replacement)
function ls { lsd $args }
function l { lsd -l $args }
function la { lsd -a $args }
function lla { lsd -la $args }
function lt { lsd --tree $args }
function ll { lsd -AlFh $args }
# Reload shell profile
function es { & $PROFILE }

View File

@@ -0,0 +1,92 @@
# Fish abbreviations (aliases that expand in place)
# Managed by chezmoi
# System
abbr -a sctl 'systemctl'
abbr -a sctlu 'systemctl --user'
abbr -a jctl 'journalctl'
# Core aliases - lsd (modern ls replacement)
abbr -a ls 'lsd'
abbr -a l 'lsd -l'
abbr -a la 'lsd -a'
abbr -a lla 'lsd -la'
abbr -a lt 'lsd --tree'
abbr -a ll 'lsd -AlFh'
abbr -a nano 'micro'
abbr -a lg 'lazygit'
abbr -a vim 'nvim'
abbr -a chlg 'lazygit --path ~/.local/share/chezmoi'
abbr -a es 'exec fish'
# Chezmoi
abbr -a cha 'chezmoi apply --interactive'
abbr -a ch 'chezmoi'
# Remote Management
abbr -a romanlog "ssh roman 'tail -F /var/log/syslog' --lines 100"
# Other aliases
abbr -a gpt 'chatgpt'
abbr -a copilot 'gh copilot'
abbr -a suggest 'gh copilot suggest -t shell'
abbr -a spt 'spotify_player'
abbr -a gitalias 'alias | grep "git "'
abbr -a mousefix 'sudo udevadm trigger'
abbr -a bw_login 'set -gx BW_SESSION (bw unlock --raw)'
# Clipboard aliases
{{ if not .wsl -}}
abbr -a copy 'xsel -ib'
abbr -a paste 'xsel -b'
abbr -a cdp 'cd (xsel -b)'
{{- else -}}
abbr -a copy 'clip.exe'
abbr -a paste 'powershell.exe -noprofile Get-Clipboard'
abbr -a cdp 'cd (xsel -b)'
{{- end }}
# Bluetooth device aliases
abbr -a budsOff 'bluetoothctl block 60:3A:AF:75:61:80'
abbr -a budsOn 'bluetoothctl unblock 60:3A:AF:75:61:80 && bluetoothctl connect 60:3A:AF:75:61:80'
abbr -a maestroOff 'bluetoothctl block AC:BF:71:66:FE:B2'
abbr -a maestroOn 'bluetoothctl unblock AC:BF:71:66:FE:B2 && bluetoothctl connect AC:BF:71:66:FE:B2'
# Git Aliases
abbr -a ga 'git add'
abbr -a gaa 'git add .'
abbr -a gaaa 'git add --all'
abbr -a gau 'git add --update'
abbr -a gb 'git branch'
abbr -a gbd 'git branch --delete'
abbr -a gc 'git commit'
abbr -a gcm 'git commit --message'
abbr -a gcf 'git commit --fixup'
abbr -a gco 'git checkout'
abbr -a gcob 'git checkout -b'
abbr -a gcom 'git checkout master'
abbr -a gcos 'git checkout staging'
abbr -a gcod 'git checkout develop'
abbr -a gd 'git diff'
abbr -a gda 'git diff HEAD'
abbr -a glg 'git log --graph --oneline --decorate --all'
abbr -a gld 'git log --pretty=format:"%h %ad %s" --date=short --all'
abbr -a gm 'git merge --no-ff'
abbr -a gma 'git merge --abort'
abbr -a gmc 'git merge --continue'
abbr -a gp 'git pull'
abbr -a gpr 'git pull --rebase'
abbr -a gr 'git rebase'
abbr -a gs 'git status'
abbr -a gss 'git status --short'
abbr -a gst 'git stash'
abbr -a gsta 'git stash apply'
abbr -a gstd 'git stash drop'
abbr -a gstl 'git stash list'
abbr -a gstp 'git stash pop'
abbr -a gsts 'git stash save'
# KiTTY SSH kitten
if test "$TERM" = "xterm-kitty"
abbr -a ssh 'kitty +kitten ssh'
end

View File

View File

@@ -0,0 +1,38 @@
# Fish shell configuration
# Managed by chezmoi
# Disable greeting
set -g fish_greeting
{{- if .wsl }}
if status is-login
and status is-interactive
keychain --quiet --agents ssh --eval ~/.ssh/id_rsa | source
end
{{- end }}
# Common shared configuration (environment variables, PATH, tool setup)
{{ template "scripts/commonrc.fish.tmpl" dict "data" . }}
# Chezmoi shell completion
{{ completion "fish" }}
# VS Code / Cursor shell integration
if test "$TERM_PROGRAM" = "vscode"
if command -q code
string replace -r '^' '' (code --locate-shell-integration-path fish) | source
else if command -q cursor
string replace -r '^' '' (cursor --locate-shell-integration-path fish) | source
end
end
# fzf key bindings (if fzf.fish plugin installed via Fisher)
# Note: This is handled automatically by Fisher plugin
# Load custom functions from ~/.config/fish/functions/
# (Fish does this automatically, no explicit sourcing needed)
# Load abbreviations
if test -f ~/.config/fish/conf.d/abbr.fish
source ~/.config/fish/conf.d/abbr.fish
end

View File

@@ -0,0 +1,10 @@
# Fish shell plugins managed by Fisher
# https://github.com/jorgebucaran/fisher
#
# To install all plugins: fisher update
# To add a plugin: fisher install <plugin>
# To remove a plugin: fisher remove <plugin>
jorgebucaran/fisher
ilancosman/tide@v6
patrickf1/fzf.fish

View File

@@ -0,0 +1,12 @@
# Defer hishtory initialization to first prompt
# This runs after startup but before user interaction
function __init_hishtory --on-event fish_prompt
# Remove this function after first run
functions --erase __init_hishtory
# Only initialize if hishtory config exists
if test -f $HOME/.hishtory/config.fish
set -gx HISHTORY_SERVER "https://hsh.{{ dopplerProjectJson.PRIVATE_DOMAIN }}"
source $HOME/.hishtory/config.fish
end
end

View File

@@ -0,0 +1,18 @@
# Lazy-load chatgpt completions on first use
function chatgpt --wraps chatgpt
# Initialize chatgpt completions only once
if not set -q __chatgpt_initialized
set -g __chatgpt_initialized 1
# Generate and source completions
if command -q chatgpt
command chatgpt --set-completions fish | source
else
echo "chatgpt is not installed" >&2
return 1
end
end
# Execute the actual chatgpt command
command chatgpt $argv
end

View File

@@ -0,0 +1,24 @@
function chcode --description "Edit chezmoi files in VS Code"
set -gx EDITOR "code --wait"
# Check if --watch is in arguments
set -l has_watch false
set -l has_file false
for arg in $argv
if test "$arg" = "--watch"
set has_watch true
else if not string match -q -- '-*' $arg
set has_file true
end
end
# If --watch is provided but no file, show error
if test $has_watch = true -a $has_file = false
echo "--watch requires a file to be provided, directories aren't supported with watch mode"
return 1
end
# Execute chezmoi edit with all arguments
chezmoi edit $argv
end

View File

@@ -0,0 +1,12 @@
function chfix --description "chmod +x the last command (if it's a file)"
# Get the last command from Fish history
set -l last_command (history --max 1 | string trim)
if test -f "$last_command"
chmod +x "$last_command"
echo "Made executable: $last_command"
else
echo "Error: $last_command is not a valid file"
return 1
end
end

View File

@@ -0,0 +1,6 @@
function chshow --description "Show rendered chezmoi template via fzf"
set -l target (find {{ .chezmoi.sourceDir | quote }} -name "*.tmpl" -type f | fzf)
if test -n "$target"
cat $target | chezmoi execute-template
end
end

View File

@@ -0,0 +1,19 @@
# Lazy-load thefuck on first use
function fuck --description "Correct your previous console command"
# Initialize thefuck only once
if not set -q __thefuck_initialized
set -g __thefuck_initialized 1
# Run thefuck alias generation
if command -q thefuck
thefuck --alias | source
else
echo "thefuck is not installed" >&2
return 1
end
end
# Execute the fuck command (which thefuck creates)
# After initialization, the actual fuck function will be defined
fuck $argv
end

View File

@@ -0,0 +1,3 @@
function gi --description "Generate .gitignore from gitignore.io"
curl -sL https://www.toptal.com/developers/gitignore/api/$argv
end

View File

@@ -0,0 +1,3 @@
function glf --description "Git log find by commit message"
git log --all --grep="$argv"
end

View File

@@ -0,0 +1,18 @@
# Lazy-load just completions on first use
function just --wraps just
# Initialize just completions only once
if not set -q __just_initialized
set -g __just_initialized 1
# Generate and source completions
if command -q just
command just --completions fish | source
else
echo "just is not installed" >&2
return 1
end
end
# Execute the actual just command
command just $argv
end

View File

@@ -0,0 +1,7 @@
function lastRuns --description "Show last N GitHub Actions runs"
set -l runs 10
if test (count $argv) -gt 0
set runs $argv[1]
end
gh run list -L $runs --json name,url | jq -c '.[] | [.name, .url] | join(" ")' -r
end

View File

@@ -0,0 +1,11 @@
# Lazy-load mise on first use
function mise --wraps mise
# Initialize mise only once
if not set -q __mise_initialized
set -g __mise_initialized 1
command mise activate fish | source
end
# Execute the actual mise command
command mise $argv
end

View File

@@ -0,0 +1,4 @@
function mktouch --description "Touch a file while creating parent directories"
mkdir -p (dirname $argv[1])
touch $argv[1]
end

View File

@@ -0,0 +1,23 @@
# Lazy-load pyenv on first use
function pyenv --wraps pyenv
# Initialize pyenv only once
if not set -q __pyenv_initialized
set -g __pyenv_initialized 1
# Add to PATH if not already there
if test -d $PYENV_ROOT/bin; and not contains $PYENV_ROOT/bin $PATH
set -gx PATH $PYENV_ROOT/bin $PATH
end
# Run pyenv init
command pyenv init - fish | source
# pyenv-virtualenv if available
if command -q pyenv-virtualenv-init
command pyenv virtualenv-init - fish | source
end
end
# Execute the actual pyenv command
command pyenv $argv
end

View File

@@ -0,0 +1,13 @@
function tempCode --description "Create a temporary file and open in VS Code"
if test (count $argv) -eq 0
echo "Must provide filetype argument (ex: py, .xml, html)"
return 1
end
# Remove preceding dot, then re-add to support both '.py' and 'py' as arguments
set -l extension (string replace -r '^\.' '' $argv[1])
set -l temp_file (mktemp /tmp/XXXXXXXXXXXX_(uuidgen).$extension)
echo "Temporary $argv[1] file created at $temp_file"
code --file-uri "file://$temp_file"
end

View File

@@ -0,0 +1,18 @@
# Lazy-load zoxide on first use of z command
function z --description "zoxide smart cd"
# Initialize zoxide only once
if not set -q __zoxide_initialized
set -g __zoxide_initialized 1
# Run zoxide init
if command -q zoxide
zoxide init fish | source
else
echo "zoxide is not installed" >&2
return 1
end
end
# Execute the actual z command (defined by zoxide init)
__zoxide_z $argv
end

View File

@@ -0,0 +1,18 @@
# Lazy-load zoxide on first use of zi command
function zi --description "zoxide interactive smart cd"
# Initialize zoxide only once (shared flag with z.fish)
if not set -q __zoxide_initialized
set -g __zoxide_initialized 1
# Run zoxide init
if command -q zoxide
zoxide init fish | source
else
echo "zoxide is not installed" >&2
return 1
end
end
# Execute the actual zi command (defined by zoxide init)
__zoxide_zi $argv
end

View File

@@ -27,7 +27,7 @@
[user]
name = Xevion
email = xevion@xevion.dev
signingkey = C217005CF3C00672
signingkey = 301511AAD64FA365
[commit]
gpgsign = true
@@ -45,6 +45,16 @@
# Common configuration for all platforms
[core]
editor = micro
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
[merge]
conflictStyle = zdiff3
[init]
defaultBranch = master

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,54 +0,0 @@
# If WSL, add SSH key on startup (once per WSL start)
{{- if .wsl }}
eval `keychain --quiet --eval --agents ssh ~/.ssh/id_rsa`
{{ end }}
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n] confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export ZSH_COMPDUMP=$ZSH/cache/.zcompdump-$HOST
export ZSH="$HOME/.oh-my-zsh"
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' frequency 7
DISABLE_AUTO_UPDATE="true" # required for chezmoi external management
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# CASE_SENSITIVE="true"
# HYPHEN_INSENSITIVE="true"
# DISABLE_MAGIC_FUNCTIONS="true"
# DISABLE_LS_COLORS="true"
# DISABLE_AUTO_TITLE="true"
# ENABLE_CORRECTION="true"
# COMPLETION_WAITING_DOTS="true"
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# HIST_STAMPS="mm/dd/yyyy"
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="powerlevel10k/powerlevel10k"
# TODO: Switch from 'asdf' to 'mise'
plugins=(
git gh fzf docker-compose docker deno chezmoi asdf yarn golang sudo zoxide bun npm brew zsh-autosuggestions F-Sy-H thefuck
{{- if .wsl -}}
{{ " kitty" }}
{{- end}}
)
source $ZSH/oh-my-zsh.sh
[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh # configure with `p10k configure`
# {{ if lookPath "bw" -}} eval "$(bw completion --shell zsh); compdef _bw bw;" {{ end }}
{{/* Common shared aliases, scripts, & shell setup details. */ -}}
{{ template "scripts/commonrc.sh.tmpl" dict "data" . "shell" "zsh" }}
{{/* Chezmoi's shell completion */ -}}
{{ completion "zsh" }}
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)"

View File

@@ -14,9 +14,18 @@ sudo apt install -y xclip xsel
{{ end }}
{{/* TODO: Add basic yes/no prompts before installing packages */ -}}
if ! type -P zsh; then
echo "chezmoi: Installing zsh"
sudo apt install zsh
# Install Fisher (Fish plugin manager) and plugins from fish_plugins file
if type -P fish; then
if [ ! -f ~/.config/fish/functions/fisher.fish ]; then
echo "chezmoi: Installing Fisher (Fish plugin manager)"
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
fi
# Update plugins from fish_plugins file
if [ -f ~/.config/fish/fish_plugins ]; then
echo "chezmoi: Updating Fish plugins from fish_plugins file"
fish -c "fisher update"
fi
fi
# Install micro (+ register as text editor)
@@ -27,9 +36,8 @@ if ! type -P micro; then
sudo mv ./micro /usr/bin/micro
fi
{{/* libpq-dev libssh-dev libsqlite3-dev */ -}}
echo "chezmoi: Installing apt packages"
PACKAGES='git fzf zsh fish sqlite curl ripgrep jq' # Install and/or update
PACKAGES='git fzf fish sqlite curl ripgrep jq' # Install and/or update
sudo apt install -y $PACKAGES
INSTALL_ONLY_PACKAGES='iperf3 unzip p7zip-full nmap reptyr btop' # Install only if missing
@@ -75,6 +83,27 @@ if ! type -P chatgpt; then
sudo mv chatgpt /usr/local/bin/
fi
# Set Fish as default shell
if type -P fish; then
FISH_PATH=$(which fish)
CURRENT_SHELL=$(getent passwd "$USER" | cut -d: -f7)
if [ "$CURRENT_SHELL" != "$FISH_PATH" ]; then
echo "chezmoi: Setting Fish as default shell"
# Add fish to /etc/shells if not already present
if ! grep -q "^$FISH_PATH$" /etc/shells; then
echo "$FISH_PATH" | sudo tee -a /etc/shells
fi
# Change default shell
sudo chsh -s "$FISH_PATH" "$USER"
echo "chezmoi: Default shell changed to Fish. Please log out and back in for changes to take effect."
else
echo "chezmoi: Fish is already the default shell"
fi
fi
{{- else if eq .chezmoi.os "darwin" -}}
#!/bin/sh
brew install ripgrep

View File

@@ -1,3 +1,3 @@
nodejs 22.11.0
nodejs latest
zoxide 0.9.6
deno 2.2.2
deno 2.2.2