chore: claned up zsh 047e8832
Steve · 2026-10-11 14:41 2 file(s) · +3 −104
home.scm +1 −1
17 17
         "zsh-syntax-highlighting"
18 18
         ;; tools the zshrc aliases/functions/init rely on
19 19
         "starship" "zoxide" "fzf" "fd" "bat" "eza" "jless"
20 -
         "neovim" "fastfetch" "xclip"
20 +
         "fastfetch" "xclip"
21 21
         ;; encryption and password management
22 22
         "gnupg" "pinentry" "password-store")))
23 23
zsh/zshrc +2 −103
25 25
setopt hist_verify
26 26
27 27
28 -
# vi mode (matches nushell edit_mode: vi)
28 +
# vi mode
29 29
set -o vi
30 30
31 31
# Edit command in $EDITOR
36 36
# =============================================================================
37 37
# Environment
38 38
# =============================================================================
39 -
export EDITOR="nvim"
39 +
export EDITOR="emacs"
40 40
export CLICOLOR=1
41 41
export TERMINAL="alacritty"
42 42
103 103
path_add "$HOME/.local/share/go/bin"
104 104
# path_add "$BUN_INSTALL/bin"
105 105
# path_add "$HOME/.tmux/plugins/t-smart-tmux-session-manager/bin"
106 -
# path_add "$HOME/.deno/bin"
107 106
# path_add "$HOME/.foundry/bin"
108 107
path_add "$HOME/.local/share"
109 108
# path_add "$HOME/.local/share/solana/install/active_release/bin"
110 -
# path_add "$HOME/.aztec/bin"
111 -
# path_add "$HOME/.nargo/bin"
112 -
# path_add "$HOME/.helios/bin"
113 -
# path_add "$HOME/.radicle/bin"
114 109
# path_add "$HOME/.local/share/fnm"
115 110
# path_add "$PNPM_HOME"
116 111
path_add "$HOME/.local/bin"
117 112
118 113
export PATH
119 114
120 -
# fnm (node version manager, not packaged in Guix)
121 -
# if command -v fnm >/dev/null 2>&1; then
122 -
#   eval "$(fnm env --shell zsh)"
123 -
#   path_add "$FNM_MULTISHELL_PATH/bin"
124 -
#   export PATH
125 -
#   # auto-switch node version on cd when .node-version / .nvmrc present
126 -
#   __fnm_autouse() {
127 -
#     if [ -f .node-version ] || [ -f .nvmrc ]; then
128 -
#       fnm use --silent-if-unchanged 2>/dev/null
129 -
#     fi
130 -
#   }
131 -
#   autoload -Uz add-zsh-hook
132 -
#   add-zsh-hook precmd __fnm_autouse
133 -
# fi
134 -
135 115
# cargo
136 116
# [ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env"
137 117
147 127
alias ff='fastfetch -c ~/.config/fastfetch/presets/examples/20.jsonc'
148 128
alias nvimrc='nvim ~/.config/nvim'
149 129
alias shitter='ssh itter'
150 -
# alias ai='aichat'
151 130
# alias system='macchina'
152 131
# alias bonsai='cbonsai -li -t 0.4'
153 132
# alias lst='lstr --icons --color=always --size'
154 -
# alias keys='keysmasher'
155 133
# alias timestamp='node -e "process.stdout.write(new Date().toISOString())"'
156 134
alias e='emacsclient -nw'
157 135
alias ghr='guix home reconfigure ~/guix-dotfiles/home.scm'
158 136
alias gsr='sudo guix system reconfigure ~/guix-dotfiles/config.scm'
159 137
160 -
# -------------------------------------------
161 -
# Suffix Aliases - Open Files by Extension
162 -
# -------------------------------------------
163 -
# Just type the filename to open it with the associated program
164 -
alias -s json=jless
165 -
alias -s md=bat
166 -
alias -s go='$EDITOR'
167 -
alias -s rs='$EDITOR'
168 -
alias -s txt=bat
169 -
alias -s log=bat
170 -
alias -s py='$EDITOR'
171 -
alias -s js='$EDITOR'
172 -
alias -s ts='$EDITOR'
173 -
alias -s html=xdg-open
174 -
175 138
# =============================================================================
176 139
# Functions
177 140
# =============================================================================
178 -
# Open a sesh session via gum filter
179 -
# t() {
180 -
#   local selected
181 -
#   selected=$(sesh list -i | gum filter --limit 1 --placeholder "Choose a session" --height 50 --prompt="> " --indicator.foreground="2" --match.foreground="2")
182 -
#   if [ -z "$selected" ]; then
183 -
#     echo "No session selected"
184 -
#   else
185 -
#     sesh connect "$selected"
186 -
#   fi
187 -
# }
188 -
189 -
# Fuzzy-find a file and open in nvim
190 -
nvimf() {
191 -
  local file
192 -
  file=$(fd --type f --hidden --exclude .git | fzf --preview "bat --color=always {}")
193 -
  if [ -z "$file" ]; then
194 -
    echo "No file selected"
195 -
  else
196 -
    nvim "$file"
197 -
  fi
198 -
}
199 -
200 -
# Install a tree-sitter parser into the nvim luarocks tree
201 -
# tsi() {
202 -
#   local parser="$1"
203 -
#   local tree="$HOME/.local/share/nvim/site"
204 -
#   luarocks --lua-version=5.1 "--tree=$tree" install "tree-sitter-$parser"
205 -
# }
206 -
207 -
# nvim startup time -> grep summary line
208 -
ns() {
209 -
  rm -f ~/.nvim-startup.txt
210 -
  nvim --headless --startuptime ~/.nvim-startup.txt +qa
211 -
  grep "NVIM STARTED" ~/.nvim-startup.txt
212 -
}
213 -
214 -
# nvim startup time -> full bat dump
215 -
nh() {
216 -
  rm -f ~/.nvim-startup.txt
217 -
  nvim --headless --startuptime ~/.nvim-startup.txt +qa
218 -
  bat ~/.nvim-startup.txt
219 -
}
220 -
221 -
# Copy file contents to clipboard
222 -
cpf() {
223 -
  xclip -selection clipboard < "$1"
224 -
  echo "✔︎ Copied to clipboard!"
225 -
}
226 -
227 -
# Set orbiter key to personal
228 -
# orbiter-personal() {
229 -
#   gum spin --spinner dot --spinner.foreground="2" --title "Updating..." -- orbiter auth --key "$(op read 'op://Personal/orbiter-api-key/credential')"
230 -
#   local check
231 -
#   check=$(gum style --foreground="2" "✓ ")
232 -
#   gum join "$check" "Orbiter key set to personal!"
233 -
# }
234 -
235 -
# Set orbiter key to orbiter account
236 -
# orbiter-account() {
237 -
#   gum spin --spinner dot --spinner.foreground="2" --title "Updating..." -- orbiter auth --key "$(op read 'op://Personal/orbiter-account-api-key/credential')"
238 -
#   local check
239 -
#   check=$(gum style --foreground="2" "✓ ")
240 -
#   gum join "$check" "Orbiter key set to Orbiter account!"
241 -
# }
242 141
243 142
# UTC timestamp for blog frontmatter
244 143
blogdate() {