diff --git a/deploy.sh b/deploy.sh index 25472c3..08a5495 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,7 +1,23 @@ +#Zsh +if [ ! -L $HOME/.zshrc ] +then + ln -fs $PWD/zshrc $HOME/.zshrc +fi + # Neovim mkdir -p $HOME/.config/nvim -ln -fs $PWD/nvim/init.lua $HOME/.config/nvim/init.lua -ln -fs $PWD/nvim/lua $HOME/.config/nvim/lua +if [ ! -L $HOME/.config/nvim/init.lua ] +then + ln -fs $PWD/nvim/init.lua $HOME/.config/nvim/init.lua +fi + +if [ ! -L $HOME/.config/nvim/lua ] +then + ln -fs $PWD/nvim/lua $HOME/.config/nvim/lua +fi # Tmux -ln -fs $PWD/tmux.conf $HOME/.tmux.conf +if [ ! -L $HOME/.tmux.conf ] +then + ln -fs $PWD/tmux.conf $HOME/.tmux.conf +fi diff --git a/zshrc b/zshrc new file mode 100644 index 0000000..06bdc66 --- /dev/null +++ b/zshrc @@ -0,0 +1,83 @@ +# call `zprof` to profile all calls in the current shell +# zmodload zsh/zprof + +# Install oh-my-zsh if it doesn't exist +if [ ! -d $HOME/.oh-my-zsh/ ] +then + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +fi + +if [ ! -d $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions ] +then + git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions +fi + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +ZSH_THEME="fb-custom" + +# Uncomment the following line to use case-sensitive completion. +#CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +HYPHEN_INSENSITIVE="true" + +# Uncomment one of the following lines to change the auto-update behavior +zstyle ':omz:update' mode reminder frequency 14 + +plugins=( + copypath + dotenv + git + history + zsh-autosuggestions +) + +source $ZSH/oh-my-zsh.sh + +# User configuration +# You may need to manually set your language environment +export LANG=en_US.UTF-8 +export LC_ALL=en_US.UTF-8 + +# Paths to prepend to system path +path=($GOPATH/bin + $HOME/.cargo/bin + $HOME/virtual_machines + $HOME/unreal_editor_5/Engine/Binaries/Linux + $path) + +if command -v keychain &> /dev/null +then + eval $(keychain --eval --quiet --nogui --noask) +fi + +setopt NO_clobber +setopt hist_ignore_all_dups +setopt hist_ignore_space + +timezsh() { + shell=$SHELL + for i in $(seq 1 10) + do + ts=$(date +%s%N) + $SHELL -i -c exit + echo $((($(date +%s%N) - $ts)/1000000))ms + done +} + +if [ ! -f "$HOME/.zsh_aliases" ] +then + touch $HOME/.zsh_aliases +fi + +include_files=( + "$HOME/.zsh_aliases" +) + +for file in $include_files +do + source $file +done