diff --git a/.config/yadm/bootstrap b/.config/yadm/bootstrap index f33ad12..0f5e485 100755 --- a/.config/yadm/bootstrap +++ b/.config/yadm/bootstrap @@ -19,11 +19,9 @@ curl -fsSL https://download.opensuse.org/repositories/shells:zsh-users:zsh-compl echo 'deb http://download.opensuse.org/repositories/shells:/zsh-users:/zsh-syntax-highlighting/Debian_Unstable/ /' | sudo tee /etc/apt/sources.list.d/shells:zsh-users:zsh-syntax-highlighting.list curl -fsSL https://download.opensuse.org/repositories/shells:zsh-users:zsh-syntax-highlighting/Debian_Unstable/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/shells_zsh-users_zsh-syntax-highlighting.gpg > /dev/null -git clone https://github.com/marlonrichert/zsh-autocomplete ~/.config/zsh/autocomplete - sudo apt update ; sudo apt install -y zsh-completions zsh-syntax-highlighting -echo "Downloading fonts" +echo "Downloading fonts to ~/Downloads" cd $HOME/Downloads wget -nv "https://download.jetbrains.com/fonts/JetBrainsMono-2.225.zip" wget -nv "https://github.com/tonsky/FiraCode/releases/download/5.2/Fira_Code_v5.2.zip" @@ -39,6 +37,7 @@ sudo apt install -y nodejs sudo npm install --global yarn +# Set git remote from HTTPS (read-only on sr.ht) to SSH yadm remote set-url origin git@git.sr.ht:~earnestma/dotfiles echo "Done!" diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 70a4dcb..dd5fff7 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -49,11 +49,30 @@ alias czh="echo 'Fully clearing history, then exiting...' && cat /dev/null > $XD PROMPT="%K{238}%F{104}%n%f%k%K{238}%F{104}@%f%k%K{238}%F{104}%m%f%k%K{238}%F{104}:%2~> %f%k" # Plugins! I try to keep as few as possible -# Cloned from bootstrap file, run `git -C .config/zsh/autocomplete pull' to update +zplugin-git(){ + if [[ ! -d ~/.config/zsh/$1 ]]; then + git clone $2 ~/.config/zsh/$1 + else + [ -z $UPDATESZ ] || git -C ~/.config/zsh/$1 pull + fi +} + +# TODO without starting a new shell in shell +zplugin-git-update(){ + UPDATESZ=1 zsh +} + +# autocomplete +zplugin-git autocomplete https://github.com/marlonrichert/zsh-autocomplete source $ZDOTDIR/autocomplete/zsh-autocomplete.plugin.zsh zstyle ':autocomplete:*' min-input 1 zstyle ':autocomplete:*' min-delay 0.25 +# autopair +zplugin-git autopair https://github.com/hlissner/zsh-autopair +source ~/.config/zsh/autopair/autopair.zsh +autopair-init + autoload -Uz vcs_info precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info )