From bab1cfeb4322e5ad434f54345abd12a1ffa717f2 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 28 Jun 2021 13:01:37 +0200 Subject: [PATCH] Move zsh config files --- general/.config/zsh/.zshrc | 67 ++++++++++++++++++++++++++++++++++++++ general/.gitignore | 3 ++ general/.zshenv | 1 + general/.zshrc | 37 --------------------- 4 files changed, 71 insertions(+), 37 deletions(-) create mode 100644 general/.config/zsh/.zshrc create mode 100644 general/.zshenv delete mode 100644 general/.zshrc diff --git a/general/.config/zsh/.zshrc b/general/.config/zsh/.zshrc new file mode 100644 index 0000000..a800522 --- /dev/null +++ b/general/.config/zsh/.zshrc @@ -0,0 +1,67 @@ + +# Initialize p10k if present +# if [[ -f "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + # source "${XDG_CACHE_HOME}/p10k-instant-prompt-${(%):-%n}.zsh" +# else + # ZSH_THEME="robbyrussell" +# fi + +# Path to your oh-my-zsh installation. +export ZSH="$XDG_CONFIG_HOME/zsh/oh-my-zsh" +# export ZSH="~/.oh-my-zsh" + +### ZPLUG ### + +# Install zplug through AUR +source /usr/share/zsh/scripts/zplug/init.zsh + +zplug "MichaelAquilina/zsh-you-should-use" +zplug "zsh-users/zsh-completions" +zplug "zsh-users/zsh-autosuggestions" +zplug "supercrabtree/k" +zplug "romkatv/powerlevel10k", as:theme, depth:1 +zplug "wting/autojump", \ + use:"bin/autojump.zsh" + +# TODO: figure out how to use redrawhook syntax highlight with autosuggestions +# zplug "zsh-users/zsh-syntax-highlighting", \ +# at:"feature/redrawhook" + +if ! zplug check --verbose; then + printf "Install? [y/N]: " + if read -q; then + echo; zplug install + fi +fi + +zplug load + +export ZSH_THEME="powerlevel10k/powerlevel10k" + +plugins=( + git + vscode + vi-mode + systemd + # npm + # npx + node + flutter + archlinux + colorize + docker + docker-compose + pip + python +) + +source $ZSH/oh-my-zsh.sh + +source ~/.aliases + +export HISTFILE="$ZDOTDIR/.zsh_history" + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + +[[ ! -f !/.zshrc.local ]] || source ~/.zshrc.local diff --git a/general/.gitignore b/general/.gitignore index db03c23..9ab0848 100644 --- a/general/.gitignore +++ b/general/.gitignore @@ -2,6 +2,9 @@ !.config/qutebrowser/config.py !.config/qutebrowser/search.py +.config/zsh/.zcompdump +.config/zsh/.zsh_history + .emacs.d/* !.emacs.d/config.org !.emacs.d/logo.svg diff --git a/general/.zshenv b/general/.zshenv new file mode 100644 index 0000000..d7b54fb --- /dev/null +++ b/general/.zshenv @@ -0,0 +1 @@ +ZDOTDIR="$XDG_CONFIG_HOME/zsh" diff --git a/general/.zshrc b/general/.zshrc deleted file mode 100644 index 6178806..0000000 --- a/general/.zshrc +++ /dev/null @@ -1,37 +0,0 @@ - -# Initialize p10k if present -if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" - ZSH_THEME="powerlevel10k/powerlevel10k" -else - ZSH_THEME="robbyrussell" -fi - -# Path to your oh-my-zsh installation. -export ZSH="$HOME/.oh-my-zsh" - -source ~/.aliases - -plugins=( - git - vscode - vi-mode - systemd - npm - npx - node - flutter - archlinux - colorize - docker - docker-compose - pip - python -) - -source $ZSH/oh-my-zsh.sh - -# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh - -[[ ! -f !/.zshrc.local ]] || source ~/.zshrc.local