From d13b9eb7e68c9e90e0b8dbeb05599d21352d640e Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Sun, 12 Dec 2021 15:00:20 -0500 Subject: [PATCH] More zsh config --- zsh/.config/zsh/.zshrc | 9 ++++++-- zsh/.config/zsh/zsh-prompt | 42 -------------------------------------- zsh/.config/zsh/zsh-zinit | 36 -------------------------------- 3 files changed, 7 insertions(+), 80 deletions(-) delete mode 100644 zsh/.config/zsh/zsh-prompt delete mode 100644 zsh/.config/zsh/zsh-zinit diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 0d61c4d..e95879a 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -30,13 +30,18 @@ autoload -Uz colors && colors source "$ZDOTDIR/zsh-functions" zsh_add_file "zsh-aliases" -zsh_add_file "zsh-prompt" -#zsh_add_file "zsh-zinit" # Plugins zsh_add_plugin "zsh-users/zsh-autosuggestions" zsh_add_plugin "zsh-users/zsh-syntax-highlighting" +zsh_add_plugin "sindresorhus/pure" + +# Prompt +fpath+="$ZDOTDIR/plugins/pure" +autoload -U promptinit; promptinit +prompt pure export EDITOR="nvim" + cat < "$ZDOTDIR/banner" diff --git a/zsh/.config/zsh/zsh-prompt b/zsh/.config/zsh/zsh-prompt deleted file mode 100644 index b3bcf10..0000000 --- a/zsh/.config/zsh/zsh-prompt +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -## autoload vcs and colors -autoload -Uz vcs_info -autoload -U colors && colors - -# enable only git -zstyle ':vcs_info:*' enable git - -# setup a hook that runs before every ptompt. -precmd_vcs_info() { vcs_info } -precmd_functions+=( precmd_vcs_info ) -setopt prompt_subst - -# add a function to check for untracked files in the directory. -# from https://github.com/zsh-users/zsh/blob/master/Misc/vcs_info-examples -zstyle ':vcs_info:git*+set-message:*' hooks git-untracked -# -+vi-git-untracked(){ - if [[ $(git rev-parse --is-inside-work-tree 2> /dev/null) == 'true' ]] && \ - git status --porcelain | grep '??' &> /dev/null ; then - # This will show the marker if there are any untracked files in repo. - # If instead you want to show the marker only if there are untracked - # files in $PWD, use: - #[[ -n $(git ls-files --others --exclude-standard) ]] ; then - hook_com[staged]+='!' # signify new files with a bang - fi -} - -zstyle ':vcs_info:*' check-for-changes true -# zstyle ':vcs_info:git:*' formats " %r/%S %b %m%u%c " -zstyle ':vcs_info:git:*' formats " %{$fg[blue]%}(%{$fg[red]%}%m%u%c%{$fg[yellow]%}%{$fg[magenta]%} %b%{$fg[blue]%})" - -# format our main prompt for hostname current folder, and permissions. -PROMPT="%B%{$fg[blue]%}[%{$fg[white]%}%n%{$fg[red]%}@%{$fg[white]%}%m%{$fg[blue]%}] %(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )%{$fg[cyan]%}%c%{$reset_color%}" -# PROMPT="%{$fg[green]%}%n@%m %~ %{$reset_color%}%#> " -PROMPT+="\$vcs_info_msg_0_ " -PROMPT+=$'\n > ' -RPROMPT="%{$fg[blue]%}%w%k %T%{$reset_color%}" -# TODO look into this for more colors -# https://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ -# also ascii escape codes diff --git a/zsh/.config/zsh/zsh-zinit b/zsh/.config/zsh/zsh-zinit deleted file mode 100644 index a8771b6..0000000 --- a/zsh/.config/zsh/zsh-zinit +++ /dev/null @@ -1,36 +0,0 @@ - -### Added by Zinit's installer -if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then - print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f" - command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit" - command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \ - print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \ - print -P "%F{160}▓▒░ The clone has failed.%f%b" -fi - -source "$HOME/.zinit/bin/zinit.zsh" -autoload -Uz _zinit -(( ${+_comps} )) && _comps[zinit]=_zinit - -# Load a few important annexes, without Turbo -# (this is currently required for annexes) -zinit light-mode for \ - zinit-zsh/z-a-rust \ - zinit-zsh/z-a-as-monitor \ - zinit-zsh/z-a-patch-dl \ - zinit-zsh/z-a-bin-gem-node - -### End of Zinit's installer chunk - -# configure pure-prompt -zinit ice compile '(pure|async).zsh' pick'async.zsh' src'pure.zsh' -zinit light sindresorhus/pure - - -zinit wait lucid for \ -atinit"ZINIT[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \ - zdharma/fast-syntax-highlighting \ -blockf \ - zsh-users/zsh-completions \ -atload"!_zsh_autosuggest_start" \ - zsh-users/zsh-autosuggestions