Compare commits
2 commits
5939e5172b
...
44a0899e61
Author | SHA1 | Date | |
---|---|---|---|
44a0899e61 | |||
412cb29eca |
3 changed files with 43 additions and 31 deletions
|
@ -10,13 +10,23 @@ fi
|
|||
|
||||
# Make utilities available
|
||||
PATH="$DOTFILES_DIR/bin:$PATH"
|
||||
. $DOTFILES_DIR/lib/function.zsh
|
||||
|
||||
for DOTFILE in "$DOTFILES_DIR"/lib/{path,env,prompt,alias,conda,plugins,custom}.zsh; do
|
||||
[ -f "$DOTFILE" ] && . "$DOTFILE"
|
||||
src=(
|
||||
'base'
|
||||
'function'
|
||||
'path'
|
||||
'env'
|
||||
'prompt'
|
||||
'alias'
|
||||
'conda'
|
||||
'plugins'
|
||||
)
|
||||
|
||||
for dotfile in $src; do
|
||||
. $DOTFILES_DIR/lib/$dotfile.zsh
|
||||
done
|
||||
|
||||
unset DOTFILE
|
||||
unset dotfile
|
||||
|
||||
DOTFILES_EXTRA_DIR="$HOME/.extra"
|
||||
|
||||
|
|
27
lib/base.zsh
Normal file
27
lib/base.zsh
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/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,29 +1,5 @@
|
|||
#!/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 lf && source "$XDG_CONFIG_HOME/lf/lfcd.sh"
|
||||
|
@ -71,8 +47,8 @@ is-executable pnpm && \
|
|||
export PNPM_HOME="$HOME/.local/share/pnpm"; \
|
||||
add-to-path prepend "$PNPM_HOME"
|
||||
|
||||
[ -d "$HOME/.pkgs/google-cloud-sdk" ] && \
|
||||
source "$HOME/.pkgs/google-cloud-sdk/completion.zsh.inc"; \
|
||||
[[ -d "$HOME/.pkgs/google-cloud-sdk" ]] && \
|
||||
. "$HOME/.pkgs/google-cloud-sdk/completion.zsh.inc"; \
|
||||
add-to-path prepend "$HOME/.pkgs/google-cloud-sdk/bin"
|
||||
|
||||
[ -d "$HOME/.deno" ] && \
|
||||
|
@ -82,7 +58,6 @@ is-executable pnpm && \
|
|||
if [ -d "$HOME/.bun" ]; then
|
||||
# bun completions
|
||||
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
|
||||
|
||||
# bun
|
||||
export BUN_INSTALL="$HOME/.bun"
|
||||
add-to-path prepend "$BUN_INSTALL/bin"
|
||||
|
|
Loading…
Reference in a new issue