Move zsh setup back into separate files for ohmyzsh custom
This commit is contained in:
parent
e7ceb24455
commit
b01daaceaa
29
home/zshrc
29
home/zshrc
|
@ -1,3 +1,8 @@
|
||||||
|
# Connect to TMUX if not login shell and not already connected
|
||||||
|
if [[ $- =~ i ]] && [[ -z "$TMUX" ]]; then
|
||||||
|
tmux new -A -s main
|
||||||
|
fi
|
||||||
|
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||||
# Initialization code that may require console input (password prompts, [y/n]
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
# confirmations, etc.) must go above this block; everything else may go below.
|
# confirmations, etc.) must go above this block; everything else may go below.
|
||||||
|
@ -83,29 +88,5 @@ source $ZSH/oh-my-zsh.sh
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
export VISUAL="nvim"
|
export VISUAL="nvim"
|
||||||
|
|
||||||
LOCAL_BIN="$HOME/.local/bin"
|
|
||||||
echo $PATH | grep -i "$LOCAL_BIN" - > /dev/null || export PATH=$PATH:$LOCAL_BIN
|
|
||||||
|
|
||||||
vim ()
|
|
||||||
{
|
|
||||||
poetry env info > /dev/null 2>&1 && poetry run nvim $@ || nvim $@
|
|
||||||
}
|
|
||||||
|
|
||||||
alias nvimdiff="nvim -d"
|
|
||||||
alias lg="lazygit"
|
|
||||||
command -v yadm > /dev/null && {
|
|
||||||
alias yvi="yadm enter nvim"
|
|
||||||
alias ylg="yadm enter lazygit"
|
|
||||||
alias yss="yadm status"
|
|
||||||
}
|
|
||||||
[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
|
|
||||||
|
|
||||||
autoload -U bashcompinit
|
|
||||||
bashcompinit
|
|
||||||
command -v pipx > /dev/null && {
|
|
||||||
command -v register-python-argcomplete3 > /dev/null && eval "$(register-python-argcomplete3 pipx)"
|
|
||||||
command -v register-python-argcomplete > /dev/null && eval "$(register-python-argcomplete pipx)"
|
|
||||||
}
|
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
|
vim ()
|
||||||
|
{
|
||||||
|
poetry env info > /dev/null 2>&1 && poetry run nvim $@ || nvim $@
|
||||||
|
}
|
||||||
|
|
||||||
alias nvimdiff="nvim -d"
|
alias nvimdiff="nvim -d"
|
||||||
alias pvim="poetry run nvim"
|
|
||||||
alias lg="lazygit"
|
alias lg="lazygit"
|
||||||
[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
autoload -U bashcompinit
|
autoload -U bashcompinit
|
||||||
bashcompinit
|
bashcompinit
|
||||||
command -v register-python-argcomplete3 > /dev/null && eval "$(register-python-argcomplete3 pipx)"
|
command -v pipx > /dev/null && {
|
||||||
command -v register-python-argcomplete > /dev/null && eval "$(register-python-argcomplete pipx)"
|
command -v register-python-argcomplete3 > /dev/null && eval "$(register-python-argcomplete3 pipx)"
|
||||||
|
command -v register-python-argcomplete > /dev/null && eval "$(register-python-argcomplete pipx)"
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,3 @@
|
||||||
|
|
||||||
LOCAL_BIN="$HOME/.local/bin"
|
LOCAL_BIN="$HOME/.local/bin"
|
||||||
echo $PATH | grep -i "$LOCAL_BIN" - > /dev/null || export PATH=$PATH:$LOCAL_BIN
|
echo $PATH | grep -i "$LOCAL_BIN" - > /dev/null || export PATH=$PATH:$LOCAL_BIN
|
||||||
|
|
||||||
DOTFILES_BIN="$(dirname $(dirname $(readlink -f $0)))/bin"
|
|
||||||
echo $PATH | grep -i "$DOTFILES_BIN" - > /dev/null || export PATH=$PATH:$DOTFILES_BIN
|
|
||||||
|
|
Loading…
Reference in a new issue