add git config and zsh configs (using zim)

This commit is contained in:
Mark Riedesel 2024-06-12 09:27:32 -05:00
parent 87f414ba2c
commit f52056a747
6 changed files with 192 additions and 0 deletions

9
.config/zsh/.zimrc Normal file
View file

@ -0,0 +1,9 @@
zmodule prompt-pwd
zmodule git-info
zmodule s1ck94
zmodule zsh-users/zsh-syntax-highlighting
zmodule completion
zmodule zsh-users/zsh-autosuggestions
zmodule ssh
zmodule utility
zmodule pacman

37
.config/zsh/.zshrc Normal file
View file

@ -0,0 +1,37 @@
# vim:set ft=zsh:
# Fix for foot terminfo not installed on most servers
alias ssh="TERM=xterm-256color ssh"
source ~/.config/user-dirs.dirs
## Options
setopt correct # Auto correct mistakes
setopt extendedglob # Extended globbing. Allows using regular expressions with *
setopt nocaseglob # Case insensitive globbing
setopt rcexpandparam # Array expension with parameters
setopt nocheckjobs # Don't warn about running processes when exiting
setopt numericglobsort # Sort filenames numerically when it makes sense
setopt nobeep # No beep
setopt appendhistory # Immediately append history instead of overwriting
setopt histignorealldups # If a new command is a duplicate, remove the older one
setopt autocd # If only directory path is entered, cd there.
setopt inc_append_history # Save commands are added to the history immediately, otherwise only when shell exits.
setopt histignorespace # Don't save commands that start with space
setopt extended_history # Include extra info about executed commands
setopt hist_reduce_blanks # Reduce blanks from commands in history
zstyle ':completion:*' rehash true # Automatically find new executables in path
zstyle ':completion:*' accept-exact '*(N)'
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ${XDG_CACHE_DIR:-~/.cache}/zsh
HISTFILE=${XDG_CACHE_DIR:-~/.cache}/.zhistory
HISTSIZE=50000
SAVEHIST=50000
# Additional configuration files
[ -d ~/.config/zsh/config.d/ ] && source <(cat ~/.config/zsh/config.d/*)
# Optional local config
[ -f ~/.zshrc.local ] && source ~/.zshrc.local

View file

@ -0,0 +1,17 @@
#:vim set ft=zsh:
zstyle ':zim:zmodule' use 'degit'
ZIM_HOME=${XDG_CACHE_DIR}/zim
# Download zimfw plugin manager if missing.
if [[ ! -e ${ZIM_HOME}/zimfw.zsh ]]; then
curl -fsSL --create-dirs -o ${ZIM_HOME}/zimfw.zsh \
https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh
fi
# Install missing modules, and update ${ZIM_HOME}/init.zsh if missing or outdated.
if [[ ! ${ZIM_HOME}/init.zsh -nt ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
source ${ZIM_HOME}/zimfw.zsh init -q
fi
# Initialize modules
source ${ZIM_HOME}/init.zsh

View file

@ -0,0 +1 @@
alias dots="$(~/bin/dotfiles alias)"