Update ghostty config, add lazy loading nvm, and fix typo in swap_modes

This commit is contained in:
Alex Selimov 2025-09-12 22:17:45 -04:00
parent a9e8b9329b
commit 320470fc4e
Signed by: aselimov
GPG key ID: 3DDB9C3E023F1F31
3 changed files with 30 additions and 6 deletions

View file

@ -28,7 +28,6 @@ else
fi fi
# Reload neovim theme # Reload neovim theme
local keys
if [ "$MODE" = "light" ]; then if [ "$MODE" = "light" ]; then
keys=$'<C-\\><C-n>:silent! let g:light_mode=1 | set background=light | doautocmd ColorScheme | redraw!<CR>' keys=$'<C-\\><C-n>:silent! let g:light_mode=1 | set background=light | doautocmd ColorScheme | redraw!<CR>'
else else

View file

@ -1,13 +1,14 @@
# --- Basics # --- Basics
font-family = "IosevkaTermSlab Nerd Font Propo" font-family = "IosevkaTermSlab Nerd Font Propo"
font-style = "Regular" font-style = "Regular"
font-size = 13 font-size = 12
background-opacity = 1.0 background-opacity = 1.0
window-decoration = none window-decoration = none
confirm-close-surface = false
# Auto light/dark theme pair that matches your two palettes below # Auto light/dark theme pair that matches your two palettes below
#theme = dark:my-dark,light:my-light #theme = dark:my-dark,light:my-light
theme = zenwritten-light theme = zenwritten-dark
# Font-size keybindings (match Ctrl+Shift+j/k from WezTerm) # Font-size keybindings (match Ctrl+Shift+j/k from WezTerm)
keybind = all:ctrl+shift+k=increase_font_size:1 keybind = all:ctrl+shift+k=increase_font_size:1

View file

@ -1,7 +1,6 @@
#============================================================================== #==============================================================================
# Zsh Configuration # Zsh Configuration
#============================================================================== #==============================================================================
# History settings # History settings
HISTFILE=~/.histfile HISTFILE=~/.histfile
HISTSIZE=100000 HISTSIZE=100000
@ -62,9 +61,33 @@ zstyle -e ':completion:*:hosts' hosts 'reply=(
#============================================================================== #==============================================================================
# nvm # nvm
# Lazy-load nvm - only initialize when first used
export NVM_DIR="$HOME/.nvm" export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion # Function to load nvm (called only once)
load_nvm() {
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
}
# Create placeholder functions that load nvm once, then call the real command
nvm() {
unset -f nvm node npm
load_nvm
nvm "$@"
}
node() {
unset -f nvm node npm
load_nvm
node "$@"
}
npm() {
unset -f nvm node npm
load_nvm
npm "$@"
}
# ghcup # ghcup
[ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env [ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env
@ -112,3 +135,4 @@ if [ "$(uname)" = "Darwin" ]; then
else else
alias ls="ls --classify --group-directories-first --color" alias ls="ls --classify --group-directories-first --color"
fi fi