This commit is contained in:
Tyler Beckman 2023-12-26 18:56:38 -05:00
parent aa19f19f6a
commit 6031f61974
Signed by: Ty
GPG key ID: 2813440C772555A4
4 changed files with 24 additions and 9 deletions

View file

@ -10,7 +10,16 @@ zinit light zpm-zsh/colorize; # Colorizes a handfull of comands
if command -v atuin &> /dev/null; then
zinit light ellie/atuin; # Add atuin (better cmd history) support to zsh
# Declare a custom autosuggestion strategy for zsh-autosuggestions
_zsh_autosuggest_strategy_atuin() {
local results
results=("${(@f)$(atuin search -e 0 --cmd-only $1)}")
typeset -g suggestion="${results[-1]}"
}
fi
export ZSH_AUTOSUGGEST_STRATEGY=(history completion) # Use history when available, then completion
export ZSH_AUTOSUGGEST_STRATEGY=(atuin completion) # Use atuin history when available, then completion
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh # Load Powerlevel10k config

View file

@ -1,3 +1,4 @@
[[ ! -f ~/.zenv.zsh ]] || source ~/.zenv.zsh
#---------------------------------------------------------------------------------#
### Fixes
export MOZ_USE_XINPUT2=1 # Use pixel-by-pixel touchpad scrolling in Firefox
@ -17,3 +18,5 @@ if command -v pyenv &> /dev/null; then
eval "$(pyenv init -)"
fi
#---------------------------------------------------------------------------------#
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
echo "bye" | gpg-connect-agent &> /dev/null

View file

@ -31,4 +31,7 @@ mgc ()
mambembe-cli get-token -s "$@" | fzf --reverse -0 -1 | rg -oP 'Token: "\K\d+' | xclip -i -selection clipboard
}
alias yarn-classic="corepack prepare yarn@1.22.19 --activate"
alias yarn-modern="corepack prepare yarn@3.2.1 --activate"
alias yarn-modern="corepack prepare yarn@3.6.1 --activate"
ckdir() {
mkdir $1 && cd $1
}

View file

@ -1,3 +1,4 @@
[[ ! -f ~/.zenv.zsh ]] || source ~/.zenv.zsh
#---------------------------------------------------------------------------------#
### Powerlevel10k instant prompt
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
@ -13,10 +14,10 @@ if [[ -f /usr/share/nvm/init-nvm.sh ]]; then
fi
#---------------------------------------------------------------------------------#
### Add things to PATH
path+=("$HOME/.pyenv/bin")
path+=("$XDG_DATA_HOME/pyenv/bin")
path+=("$HOME/.local/bin")
path+=("$HOME/Android/Sdk/platform-tools")
path+=("$HOME/.cargo/bin")
path+=("$XDG_DATA_HOME/cargo/bin")
export PATH
#--------------------------------------------------------------------------------#
### Zsh config
@ -79,8 +80,7 @@ bindkey "^[[3;5~" kill-word
bindkey "^H" backward-kill-word
bindkey "^[[1;5D" backward-word
bindkey "^[[1;5C" forward-word
#---------------------------------------------------------------------------------#
### Gitea autocompletions
if ls "$HOME/.config/tea/autocomplete.zsh" &>/dev/null; then
PROG=tea _CLI_ZSH_AUTOCOMPLETE_HACK=1 source "/home/tyman/.config/tea/autocomplete.zsh"
fi
#--------------------------------------------------------------------------------#
### Idk ssh or something
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
echo "bye" | gpg-connect-agent &> /dev/null