101 lines
2.1 KiB
Bash
101 lines
2.1 KiB
Bash
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||
# Initialization code that may require console input (password prompts, [y/n]
|
||
# confirmations, etc.) must go above this block; everything else may go below.
|
||
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
|
||
|
||
[[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
|
||
|
||
echo "Loading zgen..."
|
||
source ~/bin/zgen/zgen.zsh
|
||
source ~/bin/fixcolors
|
||
|
||
HIST_STAMPS="yyyy-mm-dd"
|
||
HISTFILE=~/.histfile
|
||
HISTSIZE=2000
|
||
SAVEHIST=2000
|
||
setopt appendhistory autocd extendedglob
|
||
|
||
if [ -x /usr/bin/xset ]; then
|
||
xset -b
|
||
fi
|
||
|
||
if [[ ${TERM} == st* ]]; then
|
||
if [ ! -e /usr/share/terminfo/s/st-256color ]; then
|
||
export TERM=xterm-256color
|
||
fi
|
||
fi
|
||
if [[ ${TERM} == foot ]]; then
|
||
export TERM=xterm-256color
|
||
fi
|
||
|
||
unsetopt beep
|
||
bindkey -e
|
||
export LESS="-X -R -F"
|
||
|
||
export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||
export PAGER=most
|
||
export EDITOR=mg
|
||
|
||
autoload insert-composed-char
|
||
zle -N insert-composed-char
|
||
# bind it to some key (Ctrl+x in this example)
|
||
bindkey insert-composed-char
|
||
|
||
if ! zgen saved; then
|
||
echo "creating zgen save..."
|
||
|
||
# prezto options
|
||
zgen prezto editor key-bindings 'emacs'
|
||
# zgen prezto prompt theme 'off'
|
||
|
||
# prezto load
|
||
zgen prezto
|
||
zgen prezto terminal
|
||
zgen prezto ssh
|
||
zgen prezto python
|
||
zgen prezto git
|
||
zgen prezto history
|
||
zgen prezto tmux
|
||
zgen prezto syntax-highlighting
|
||
zgen prezto completion
|
||
|
||
# not prezto
|
||
zgen load Tarrasch/zsh-bd
|
||
zgen load Tarrasch/zsh-colors
|
||
zgen load supercrabtree/k
|
||
zgen save
|
||
fi
|
||
|
||
#prompt fire 178 142 106 070 034
|
||
|
||
. ~/bin/aliases
|
||
if [[ ${TERM} == linux ]]; then
|
||
prompt pure
|
||
else
|
||
prompt powerlevel10k
|
||
fi
|
||
|
||
unalias rm
|
||
unalias mv
|
||
unalias cp
|
||
|
||
# STOP SHARING HISTORY
|
||
#unsetopt share_history
|
||
setopt NO_SHARE_HISTORY
|
||
setopt HIST_EXPIRE_DUPS_FIRST
|
||
|
||
cyan pyenv
|
||
export PYENV_ROOT="$HOME/.pyenv"
|
||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||
if command -v pyenv 1>/dev/null 2>&1; then
|
||
eval "$(pyenv init -)"
|
||
fi
|
||
|
||
|
||
yellow All Done!
|
||
|
||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||
|