Compare commits
No commits in common. "44a0899e614c19383af833748feb490add963f1d" and "5939e5172ba49d4f37359e7b04bc25a2761408ae" have entirely different histories.
44a0899e61
...
5939e5172b
3 changed files with 31 additions and 43 deletions
|
@ -10,23 +10,13 @@ fi
|
||||||
|
|
||||||
# Make utilities available
|
# Make utilities available
|
||||||
PATH="$DOTFILES_DIR/bin:$PATH"
|
PATH="$DOTFILES_DIR/bin:$PATH"
|
||||||
|
. $DOTFILES_DIR/lib/function.zsh
|
||||||
|
|
||||||
src=(
|
for DOTFILE in "$DOTFILES_DIR"/lib/{path,env,prompt,alias,conda,plugins,custom}.zsh; do
|
||||||
'base'
|
[ -f "$DOTFILE" ] && . "$DOTFILE"
|
||||||
'function'
|
|
||||||
'path'
|
|
||||||
'env'
|
|
||||||
'prompt'
|
|
||||||
'alias'
|
|
||||||
'conda'
|
|
||||||
'plugins'
|
|
||||||
)
|
|
||||||
|
|
||||||
for dotfile in $src; do
|
|
||||||
. $DOTFILES_DIR/lib/$dotfile.zsh
|
|
||||||
done
|
done
|
||||||
|
|
||||||
unset dotfile
|
unset DOTFILE
|
||||||
|
|
||||||
DOTFILES_EXTRA_DIR="$HOME/.extra"
|
DOTFILES_EXTRA_DIR="$HOME/.extra"
|
||||||
|
|
||||||
|
|
27
lib/base.zsh
27
lib/base.zsh
|
@ -1,27 +0,0 @@
|
||||||
#!/usr/bin/env zsh
|
|
||||||
|
|
||||||
autoload -Uz compinit
|
|
||||||
compinit
|
|
||||||
|
|
||||||
# XDG
|
|
||||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
|
||||||
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
|
||||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.local/cache}"
|
|
||||||
|
|
||||||
export HISTFILE=~/.zsh_history
|
|
||||||
export HISTSIZE=32768
|
|
||||||
export HISTFILESIZE="${HISTSIZE}"
|
|
||||||
export SAVEHIST=4096
|
|
||||||
export HISTCONTROL=ignoredups:erasedups
|
|
||||||
export LESS='-R'
|
|
||||||
export LS_COLORS="ow=1;34:tw=1;34:st=00;"
|
|
||||||
|
|
||||||
# add completions to fpath
|
|
||||||
fpath=($DOTFILES_DIR/lib/completions $fpath)
|
|
||||||
|
|
||||||
# Append to the history file, rather than overwriting it
|
|
||||||
setopt APPEND_HISTORY
|
|
||||||
# Disable autocd
|
|
||||||
unsetopt autocd
|
|
||||||
|
|
||||||
|
|
29
lib/env.zsh
29
lib/env.zsh
|
@ -1,5 +1,29 @@
|
||||||
#!/usr/bin/env zsh
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
# XDG
|
||||||
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
|
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||||
|
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.local/cache}"
|
||||||
|
|
||||||
|
export HISTFILE=~/.zsh_history
|
||||||
|
export HISTSIZE=32768
|
||||||
|
export HISTFILESIZE="${HISTSIZE}"
|
||||||
|
export SAVEHIST=4096
|
||||||
|
export HISTCONTROL=ignoredups:erasedups
|
||||||
|
export LESS='-R'
|
||||||
|
export LS_COLORS="ow=1;34:tw=1;34:st=00;"
|
||||||
|
|
||||||
|
# add completions to fpath
|
||||||
|
fpath=($DOTFILES_DIR/lib/completions $fpath)
|
||||||
|
|
||||||
|
autoload -Uz compinit && compinit
|
||||||
|
|
||||||
|
# Append to the history file, rather than overwriting it
|
||||||
|
setopt APPEND_HISTORY
|
||||||
|
|
||||||
|
# Disable autocd
|
||||||
|
unsetopt autocd
|
||||||
|
|
||||||
is-executable nvim && export EDITOR=nvim || export EDITOR=vim
|
is-executable nvim && export EDITOR=nvim || export EDITOR=vim
|
||||||
|
|
||||||
is-executable lf && source "$XDG_CONFIG_HOME/lf/lfcd.sh"
|
is-executable lf && source "$XDG_CONFIG_HOME/lf/lfcd.sh"
|
||||||
|
@ -47,8 +71,8 @@ is-executable pnpm && \
|
||||||
export PNPM_HOME="$HOME/.local/share/pnpm"; \
|
export PNPM_HOME="$HOME/.local/share/pnpm"; \
|
||||||
add-to-path prepend "$PNPM_HOME"
|
add-to-path prepend "$PNPM_HOME"
|
||||||
|
|
||||||
[[ -d "$HOME/.pkgs/google-cloud-sdk" ]] && \
|
[ -d "$HOME/.pkgs/google-cloud-sdk" ] && \
|
||||||
. "$HOME/.pkgs/google-cloud-sdk/completion.zsh.inc"; \
|
source "$HOME/.pkgs/google-cloud-sdk/completion.zsh.inc"; \
|
||||||
add-to-path prepend "$HOME/.pkgs/google-cloud-sdk/bin"
|
add-to-path prepend "$HOME/.pkgs/google-cloud-sdk/bin"
|
||||||
|
|
||||||
[ -d "$HOME/.deno" ] && \
|
[ -d "$HOME/.deno" ] && \
|
||||||
|
@ -58,6 +82,7 @@ is-executable pnpm && \
|
||||||
if [ -d "$HOME/.bun" ]; then
|
if [ -d "$HOME/.bun" ]; then
|
||||||
# bun completions
|
# bun completions
|
||||||
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
|
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
|
||||||
|
|
||||||
# bun
|
# bun
|
||||||
export BUN_INSTALL="$HOME/.bun"
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
add-to-path prepend "$BUN_INSTALL/bin"
|
add-to-path prepend "$BUN_INSTALL/bin"
|
||||||
|
|
Loading…
Reference in a new issue