From 7f2e2dbe7f2d2ae4ba8999b385e5c94a245e9879 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 9 Feb 2026 16:01:01 -0500 Subject: [PATCH] [zsh] Fixing aliases some more --- bash/.aliases | 5 ----- zsh/.zshrc | 24 +++++++++++++++++++----- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/bash/.aliases b/bash/.aliases index eb32da3..3cc10d4 100644 --- a/bash/.aliases +++ b/bash/.aliases @@ -16,7 +16,6 @@ alias push="git push" alias bookpull="rsync -aziuvhP root@rhea.local:/tank/books/ ~/.calibre/" alias bookpush="rsync -aziuvhP ~/.calibre/ root@rhea.local:/tank/books/" alias gpghup='gpgconf --kill gpg-agent && gpgconf --launch gpg-agent' -alias eosup='yay -Sy && yay -S --noconfirm archlinux-keyring endeavouros-keyring && yay -Syu --noconfirm' # Vrobbler shortcuts alias vdeploy="ssh life.unbl.ink \"rm -rf /root/vrobbler-venv/lib/python3.11/site-packages/vrobbler-0.15.4.dist-info/ && pip install git+https://code.unbl.ink/secstate/vrobbler.git@develop && systemctl restart vrobbler\"" @@ -39,7 +38,3 @@ alias hrstg="(cd $HUNGRYROOT_DIR && just ecs-exec staging)" alias hrlogs="tail -f -n 50 /tmp/hungryroot-django.log" alias hrdc="(cd $HUNGRYROOT_DIR && just docker-run)" alias hrotp="pass otp work/hungryroot/okta" - -# UTM related nonsense -alias toggle_ntp="sudo timedatectl set-ntp $(timedatectl show -p NTP --value | grep -q yes && echo false || echo true)" -alias fixtime="toggle_ntp && sleep 3 && toggle_ntp" diff --git a/zsh/.zshrc b/zsh/.zshrc index 3cbbd2d..9af6472 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -10,20 +10,28 @@ plugins=(git z fzf asdf direnv emacs yarn aws) source $ZSH/oh-my-zsh.sh -# See ~/.aliases for the various aliases seen in here -source "$HOME/.aliases" -newemail() { +create_email() { curl -X POST --user colin@unbl.ink:$(pass personal/colin@unbl.ink | head -n 1) -d "address=$1@unbl.ink" -d "forwards_to=colin@unbl.ink" https://box.unbl.ink/admin/mail/aliases/add } -yayup() { +eosup() { mv ~/.asdf ~/.asdf.bak + yay -Ss yay -S --noconfirm archlinux-keyring endeavouros-keyring yay -Syu --noconfirm mv ~/.asdf.bak ~/.asdf } +# quick way to fix clock drift in UTM VM +toggle_ntp() { + sudo timedatectl set-ntp "$( + timedatectl show -p NTP --value | grep -qi '^yes$' && echo false || echo true + )" +} +alias fixtime="toggle_ntp && toggle_ntp" + + local hostname="%{$fg_bold[white]%}%m" PROMPT="${hostname} ${PROMPT}" @@ -43,7 +51,7 @@ export VISUAL="$EDITOR" case "$(uname -s)" in Linux) - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + [[ -d "/home/linuxbrew/.linuxbrew/bin" ]] && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv &>/dev/null)" ;; Darwin) eval "$(/opt/homebrew/bin/brew shellenv)" @@ -55,3 +63,9 @@ export GPG_TTY=$(tty) . ${ASDF_DATA_DIR:-$HOME/.asdf}/plugins/golang/set-env.zsh &>/dev/null load_keys &>/dev/null + +# opencode +[[ -d "~/.opencode" ]] && export PATH=/Users/colin.powell/.opencode/bin:$PATH + +# See ~/.aliases for the various aliases seen in here +source "$HOME/.aliases"