dotfiles-remastered/.zshrc

89 lines
2.6 KiB
Bash
Raw Normal View History

2020-06-11 13:11:19 +00:00
############################
# #
# ███████╗███████╗██╗ ██╗ #
# ╚══███╔╝██╔════╝██║ ██║ #
# ███╔╝ ███████╗███████║ #
# ███╔╝ ╚════██║██╔══██║ #
# ███████╗███████║██║ ██║ #
# ╚══════╝╚══════╝╚═╝ ╚═╝ #
# #
############################
2020-06-11 19:54:49 +00:00
# Required packages:
# - zsh
# - zsh-theme-powerline10k
# - zsh-sytax-hightlighting
# - zsh-completions
# - zsh-autosuggestions
# - nerd-font-hack
# - lsd
2020-06-11 13:11:19 +00:00
export PATH=/$HOME/.local/bin:$PATH
export BROWSER=firefox
2020-06-11 13:11:19 +00:00
export EDITOR=nvim
export VISUAL=nvim
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
[[ $- != *i* ]] && return
# Oh my zsh stuff
# 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
export ZSH="/usr/share/oh-my-zsh"
export HISTFILE="$XDG_CACHE_HOME/zsh_history"
if [[ -n $SSH_CONNECTION ]]; then
ZSH_THEME="gallois"
else
ZSH_THEME="../../zsh-theme-powerlevel10k/powerlevel10k"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
# [[ ! -f "$XDG_CACHE_HOME/p10k.zsh" ]] || source "$XDG_CACHE_HOME/p10k.zsh"
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
fi
DISABLE_UPDATE_PROMPT=true
DISABLE_AUTO_UPDATE=true
ZSH_CACHE_DIR="$XDG_CACHE_HOME/oh-my-zsh" # mkdir ~/.cache/oh-my-zsh
_Z_DATA="$XDG_CACHE_HOME/z"
plugins=(
git
last-working-dir
colored-man-pages
extract
z
)
# start oh my zsh
source $ZSH/oh-my-zsh.sh
autoload -U compinit && compinit -d "$XDG_CACHE_HOME/zcompdump"
# Sytax highlight
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# autosugestion
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
# Aliases
alias vim="nvim"
alias sudo='sudo '
alias please='sudo '
[ -z $SSH_CONNECTION ] && alias ls='lsd'
alias svim='sudo -E nvim'
alias xclip='xclip -selection "clipboard"'
alias mixer='ncpamixer'
alias dotfiles="git --git-dir=$XDG_DATA_HOME/dotfiles-remastered --work-tree=$HOME" # dotfile config --local status.showUntrackedFiles no