[zsh] Fixing aliases some more
This commit is contained in:
@ -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"
|
||||
|
||||
24
zsh/.zshrc
24
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"
|
||||
|
||||
Reference in New Issue
Block a user