From 7fb864f1bad69c314b2223dbcbfea216ed278d0a Mon Sep 17 00:00:00 2001 From: Trianta <56975502+Trimutex@users.noreply.github.com> Date: Tue, 26 Mar 2024 02:18:38 -0500 Subject: [PATCH] Added zshrc to dotfiles --- .zshrc | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ deploy.sh | 2 ++ update.sh | 3 +++ 3 files changed, 85 insertions(+) create mode 100644 .zshrc diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..4107b4c --- /dev/null +++ b/.zshrc @@ -0,0 +1,80 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +# End of lines configured by zsh-newuser-install +# The following lines were added by compinstall +zstyle :compinstall filename '/home/trianta/.zshrc' + +autoload -Uz compinit + +compinit +# End of lines added by compinstall +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' + + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +# Alias +alias vi="nvim" +alias vim="nvim" + +# Plugins from AUR +source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme +source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh +source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh + +# Enable color support +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias l='ls -la --color -h --group-directories-first' + alias ls='ls --color -h --group-directories-first' + alias dir='dir --color=auto' + alias vdir='vdir --color=auto' + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# Hyprland login +alias hy='Hyprland' + +# Export ~/.config path +export XDG_CONFIG_HOME="$HOME/.config" + +# Created by `pipx` on 2023-10-16 08:33:15 +export PATH="$PATH:/home/trianta/.local/bin" + +# Little neat settings +set colored-stats On +set completion-ignore-case On +set completion-prefix-display-length 3 +set mark-symlinked-directories On +set show-all-if-ambiguous On +set show-all-if-unmodified On +set visible-stats On + +# Keyboard binds +bindkey ";2D" beginning-of-line +bindkey ";2C" end-of-line +bindkey ";3D" backward-word +bindkey ";3C" forward-word +bindkey ";5D" backward-word +bindkey ";5C" forward-word +bindkey "^[[H" beginning-of-line +bindkey "^[[F" end-of-line +bindkey "^[[3~" delete-char + +# ZSH plugin binds +bindkey '^[[A' history-substring-search-up +bindkey '^[[B' history-substring-search-down + diff --git a/deploy.sh b/deploy.sh index 808f346..89e18e6 100755 --- a/deploy.sh +++ b/deploy.sh @@ -8,4 +8,6 @@ echo " Note: prefix + I for tmux setup" mkdir -p ~/tmux rsync --recursive $(dirname "$0")/tmux/tmux.conf ~/.config/tmux/tmux.conf +rsync $(dirname "$0")/.zshrc ~/.zshrc + echo "Syncing complete!" diff --git a/update.sh b/update.sh index c06ffdf..3f6abcd 100755 --- a/update.sh +++ b/update.sh @@ -6,4 +6,7 @@ rsync --delete --recursive ~/.config/nvim $(dirname "$0") echo "Syncing dotfiles with tmux..." rsync ~/.config/tmux/tmux.conf $(dirname "$0")/tmux/tmux.conf +echo "Syncing dotfiles with zshrc..." +rsync ~/.zshrc $(dirname "$0")/.zshrc + echo "Syncing complete!"