-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggest your config #24
Comments
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 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. 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 |
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, |
Got it. Will look it up. |
Can i have your complete zsh setup to test? |
My basic zsh configuration is based on this repo. 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 |
Is there anything useful in the existing Bash or Zsh settings that you have?
Recommend it!
The text was updated successfully, but these errors were encountered: