BlaCk-Void-Zsh
BlaCk-Void-Zsh copied to clipboard
Suggest your config
Is there anything useful in the existing Bash or Zsh settings that you have?
Recommend it!
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
ZSH_DISABLE_COMPFIX="true"
if [[ $(uname) != "Linux" ]]
then
export ZSH="$HOME"/.oh-my-zsh
fi
ZSH_THEME="powerlevel10k/powerlevel10k"
COMPLETION_WAITING_DOTS="true"
plugins=(
zsh-autosuggestions
git
wd
python
autojump
zsh-syntax-highlighting
docker
)
source $ZSH/oh-my-zsh.sh
export LANG=en_US.UTF-8
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='vim'
fi
# non-specific
source ~/.zsh_aliases
source ~/.tmuxinator/tmuxinator.zsh
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
setopt HIST_SAVE_NO_DUPS
setopt HIST_IGNORE_ALL_DUPS
# autojump
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
# everything FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_COMMAND='fd --type f'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_COMPLETION_TRIGGER='**'
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border --info=inline'
_fzf_compgen_path() {
fd --hidden --follow --exclude ".git" . "$1"
}
_fzf_compgen_dir() {
fd --type d --hidden --follow --exclude ".git" . "$1"
}
_fzf_comprun() {
local command=$1
shift
case "$command" in
cd) fzf "$@" --preview 'tree -C {} | head -200' ;;
export|unset) fzf "$@" --preview "eval 'echo \$'{}" ;;
ssh) fzf "$@" --preview 'dig {}' ;;
vi|vim) fzf "$@" --preview 'bat --style=numbers --color=always --line-range :500 {}' ;;
*) fzf "$@" ;;
esac
}
# auto suggest bindings
bindkey "^[[1;3B" backward-kill-word
bindkey "^[[1;3D" backward-word
bindkey "^[[1;3C" forward-word
bindkey "^[[1;9B" backward-kill-word
bindkey "^[[1;9D" backward-word
bindkey "^[[1;9C" forward-word
export PATH="/usr/local/sbin:$PATH"
# powerline
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# conda setup
__conda_setup="$('/Users/sagarkar/conda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/sagarkar/conda/etc/profile.d/conda.sh" ]; then
. "/Users/sagarkar/conda/etc/profile.d/conda.sh"
else
export PATH="/Users/sagarkar/conda/bin:$PATH"
fi
fi
unset __conda_setup
Let me know if you think something is off or can be modified.
It's a concise setup, and I don't think there's much to tweak.
But I can give you some advice as far as I know.
Typically this setting in ~/.zshenv
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
And there are some settings that can make startup slower.
OMZ is slow to load. You can use a plugin manager like zinit.
plugins=(
zsh-autosuggestions
git
wd
python
autojump
zsh-syntax-highlighting
docker
)
source $ZSH/oh-my-zsh.sh
It may take a lot of time to eval.
After executing eval only once, it is a good idea to save it to a file and load it.
__conda_setup="$('/Users/sagarkar/conda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/sagarkar/conda/etc/profile.d/conda.sh" ]; then
. "/Users/sagarkar/conda/etc/profile.d/conda.sh"
else
export PATH="/Users/sagarkar/conda/bin:$PATH"
fi
fi
unset __conda_setup
This is my fzf setting https://github.com/black7375/BlaCk-Void-Zsh/blob/master/lib/fzf-set.zsh
Thanks a lot for your advice.
The eval is running the first time only or if someone deletes the file. If you are saying something different please clarify.
My intention was this part.
__conda_setup="$('/Users/sagarkar/conda/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
For example, When profiling in the past, $(brew --prefix)
was very slow.
Some external processes can be bottlenecks.
Got it. Will look it up. Thanks a lot. Any document about the bootup speed comparison for omz vs zint or similar.
Can i have your complete zsh setup to test?
My basic zsh configuration is based on this repo. There's nothing much to it.
source /home/black7375/.zsh/BlaCk-Void.zshrc
# export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $1; exit;}'):0
export DISPLAY=:0
xhost +
alias rust=evcxr