diff --git a/dotfiles/.zinit.zsh b/dotfiles/.zinit.zsh index 6b6ddfc..bfa08b2 100644 --- a/dotfiles/.zinit.zsh +++ b/dotfiles/.zinit.zsh @@ -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 diff --git a/dotfiles/.zprofile b/dotfiles/.zprofile index fd004ca..8f3b45e 100644 --- a/dotfiles/.zprofile +++ b/dotfiles/.zprofile @@ -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 diff --git a/dotfiles/.zsh_aliases b/dotfiles/.zsh_aliases index b9a98a4..5cf7ffe 100644 --- a/dotfiles/.zsh_aliases +++ b/dotfiles/.zsh_aliases @@ -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 +} diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index 4243a7b..24da766 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -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