From 4d57dc6657408de2d4023eb8d36a12be260a02f7 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 20 Jun 2022 22:14:39 -0400 Subject: [PATCH] Update aliases in .zshrc --- link/nix/zshrc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/link/nix/zshrc b/link/nix/zshrc index 9ad2c97..b32240d 100644 --- a/link/nix/zshrc +++ b/link/nix/zshrc @@ -119,16 +119,23 @@ alias pssh='ssh -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" alias sal='ssh-add -L' alias st='open -a SourceTree' alias sz='source ~/.zshrc' -alias ykey='pkill gpg-agent && source ~/.zshrc; ssh-add -L' + +# aliases whose command changes based on OS +if [[ `uname` == 'Linux' ]]; then + alias ykey='sudo systemctl restart pcscd && sudo pkill -9 gpg-agent && source ~/.zshrc; ssh-add -L' +else + alias ykey='pkill -9 gpg-agent && source ~/.zshrc; ssh-add -L' +fi ## Linux-only aliases if [[ `uname` == 'Linux' ]]; then + alias enable-ruby-27='source ~/enable-ruby-27' alias pbcopy='xclip -selection clipboard' alias pbpaste='xclip -selection clipboard -o' + alias uwgroute='nmcli connection modify SecureWest ipv4.route-metric 20; nmcli radio wifi off; nmcli radio wifi on' + alias uwgforget='nmcli connection delete SecureWest' fi - - if [[ `uname` != 'Linux' ]]; then function otpon() { osascript -e 'tell application "yubiswitch" to KeyOn'