From c2ff40d0041cd097e0257aa86bfae22a6c091444 Mon Sep 17 00:00:00 2001 From: steveokard Date: Wed, 2 Jun 2021 22:01:15 -0400 Subject: [PATCH] optimized PZT --- zsh/.zprofile | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ zsh/.zshrc | 51 ++++++++++++++++++++-------------------- 2 files changed, 89 insertions(+), 26 deletions(-) create mode 100644 zsh/.zprofile diff --git a/zsh/.zprofile b/zsh/.zprofile new file mode 100644 index 0000000..96ddede --- /dev/null +++ b/zsh/.zprofile @@ -0,0 +1,64 @@ +# +# Executes commands at login pre-zshrc. +# +# Authors: +# Sorin Ionescu +# + +# +# Browser +# + +if [[ "$OSTYPE" == darwin* ]]; then + export BROWSER='open' +fi + +# +# Editors +# + +export EDITOR='vim' +export VISUAL='vim' +export PAGER='less' + +# +# Language +# + +if [[ -z "$LANG" ]]; then + export LANG='en_US.UTF-8' +fi + +# +# Paths +# + +# Ensure path arrays do not contain duplicates. +typeset -gU cdpath fpath mailpath path + +# Set the list of directories that cd searches. +# cdpath=( +# $cdpath +# ) + +# Set the list of directories that Zsh searches for programs. +path=( + /usr/local/{bin,sbin} + $path +) + +# +# Less +# + +# Set the default Less options. +# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). +# Remove -X to enable it. +export LESS='-g -i -M -R -S -w -z-4' + +# Set the Less input preprocessor. +# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system. +if (( $#commands[(i)lesspipe(|.sh)] )); then + export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-" +fi + diff --git a/zsh/.zshrc b/zsh/.zshrc index f06fa0e..8cf680d 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -30,6 +30,30 @@ zinit ice depth=1; zinit light romkatv/powerlevel10k # Uncomment following line if you want red dots to be displayed while waiting for completion export COMPLETION_WAITING_DOTS="true" +##################### +# PREZTO +##################### + +zstyle ':prezto:*:*' case-sensitive 'no' +zstyle ':prezto:*:*' color 'yes' + +zinit ice silent; zinit snippet PZT::modules/gpg +zstyle :omz:plugins:ssh-agent identities id_rsa github_rsa pete_rsa stevserver_rsa ymca_rsa +# Auto convert .... to ../.. +zstyle ':prezto:module:editor' dot-expansion 'yes' + +zinit wait lucid for \ + OMZ::plugins/common-aliases \ + if"[[ $+commands[systemd] ]]" OMZ::plugins/systemd \ + hkupty/ssh-agent \ + PZT::modules/helper/init.zsh \ + PZT::modules/environment/init.zsh \ + PZT::modules/terminal/init.zsh \ + PZT::modules/editor/init.zsh \ + PZT::modules/history/init.zsh \ + PZT::modules/directory/init.zsh \ + PZT::modules/spectrum/init.zsh + # PZT::modules/utility/init.zsh ##################### # PLUGINS # ##################### @@ -39,15 +63,6 @@ zstyle ':prezto:module:tmux:session' name 'λ' zstyle ':prezto:module:tmux:auto-start' remote 'yes' zinit ice zinit snippet PZT::modules/tmux # }}} -# prezto {{{ -zstyle ':prezto:*:*' case-sensitive 'no' -zstyle ':prezto:*:*' color 'yes' -zinit ice zinit snippet PZT::modules/editor - -zinit ice silent; zinit snippet PZT::modules/gpg -zinit ice silent pick"init.zsh" lucid; zinit snippet PZT::modules/utility -zstyle :omz:plugins:ssh-agent identities id_rsa github_rsa pete_rsa stevserver_rsa ymca_rsa -# }}} ##Set VI MODE bindkey -v bindkey '^r' history-incremental-search-backward @@ -198,15 +213,10 @@ unsetopt CHECK_JOBS # Don't report on jobs when shell exit. ##################### # ENV VARIABLE # ##################### -#export EDITOR='nvim' export EDITOR='vim' export VISUAL=$EDITOR export PAGER='less' -#export SHELL='/bin/zsh' -# if [[ ! $(tmux ls) ]] 2> /dev/null; then - # tmux new -s λ -# fi ##################### # COLORING # ##################### @@ -216,18 +226,7 @@ autoload colors && colors # ALIASES # ##################### source $HOME/.zsh_aliases -zinit wait lucid for \ - OMZ::plugins/common-aliases \ - if"[[ $+commands[systemd] ]]" OMZ::plugins/systemd \ - PZT::modules/directory/init.zsh \ - PZT::modules/tmux \ - hkupty/ssh-agent \ - PZT::modules/helper \ - PZT::modules/environment \ - PZT::modules/terminal \ - PZT::modules/spectrum \ - PZT::modules/history \ - PZT::modules/directory \ + ##################### # FANCY-CTRL-Z # #####################