a
This commit is contained in:
parent
aa19f19f6a
commit
6031f61974
4 changed files with 24 additions and 9 deletions
|
@ -10,7 +10,16 @@ zinit light zpm-zsh/colorize; # Colorizes a handfull of comands
|
||||||
|
|
||||||
if command -v atuin &> /dev/null; then
|
if command -v atuin &> /dev/null; then
|
||||||
zinit light ellie/atuin; # Add atuin (better cmd history) support to zsh
|
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
|
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
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh # Load Powerlevel10k config
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
[[ ! -f ~/.zenv.zsh ]] || source ~/.zenv.zsh
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Fixes
|
### Fixes
|
||||||
export MOZ_USE_XINPUT2=1 # Use pixel-by-pixel touchpad scrolling in Firefox
|
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 -)"
|
eval "$(pyenv init -)"
|
||||||
fi
|
fi
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
|
echo "bye" | gpg-connect-agent &> /dev/null
|
||||||
|
|
|
@ -31,4 +31,7 @@ mgc ()
|
||||||
mambembe-cli get-token -s "$@" | fzf --reverse -0 -1 | rg -oP 'Token: "\K\d+' | xclip -i -selection clipboard
|
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-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
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
[[ ! -f ~/.zenv.zsh ]] || source ~/.zenv.zsh
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Powerlevel10k instant prompt
|
### Powerlevel10k instant prompt
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
# 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
|
fi
|
||||||
#---------------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------------#
|
||||||
### Add things to PATH
|
### Add things to PATH
|
||||||
path+=("$HOME/.pyenv/bin")
|
path+=("$XDG_DATA_HOME/pyenv/bin")
|
||||||
path+=("$HOME/.local/bin")
|
path+=("$HOME/.local/bin")
|
||||||
path+=("$HOME/Android/Sdk/platform-tools")
|
path+=("$HOME/Android/Sdk/platform-tools")
|
||||||
path+=("$HOME/.cargo/bin")
|
path+=("$XDG_DATA_HOME/cargo/bin")
|
||||||
export PATH
|
export PATH
|
||||||
#--------------------------------------------------------------------------------#
|
#--------------------------------------------------------------------------------#
|
||||||
### Zsh config
|
### Zsh config
|
||||||
|
@ -79,8 +80,7 @@ bindkey "^[[3;5~" kill-word
|
||||||
bindkey "^H" backward-kill-word
|
bindkey "^H" backward-kill-word
|
||||||
bindkey "^[[1;5D" backward-word
|
bindkey "^[[1;5D" backward-word
|
||||||
bindkey "^[[1;5C" forward-word
|
bindkey "^[[1;5C" forward-word
|
||||||
#---------------------------------------------------------------------------------#
|
#--------------------------------------------------------------------------------#
|
||||||
### Gitea autocompletions
|
### Idk ssh or something
|
||||||
if ls "$HOME/.config/tea/autocomplete.zsh" &>/dev/null; then
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
PROG=tea _CLI_ZSH_AUTOCOMPLETE_HACK=1 source "/home/tyman/.config/tea/autocomplete.zsh"
|
echo "bye" | gpg-connect-agent &> /dev/null
|
||||||
fi
|
|
||||||
|
|
Reference in a new issue