Fix upgrade function, add yubikey notification for ssh.

This commit is contained in:
Bartek Stalewski 2024-06-23 13:57:49 +02:00
parent 9d5b86589d
commit 4f0f05c5d6
Signed by: ftpd
SSH Key Fingerprint: SHA256:vGQiaNJcfUMLt3wF58+Zx15C6SpRDA9spUeggjVY8Yo
3 changed files with 14 additions and 0 deletions

View File

@ -23,6 +23,7 @@ source $ZDOTDIR/aliases.zsh
source $ZDOTDIR/cleanhome.zsh
source $ZDOTDIR/fzf.zsh
source $ZDOTDIR/keys.zsh
source $ZDOTDIR/ssh.zsh
# source modules
source ~/.local/git/zsh_modules/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh

View File

@ -48,3 +48,10 @@ function ud() {
for i in ${LOCAL_GIT_DIR}/dotfiles ${LOCAL_GIT_DIR}/zsh_modules/*; do git -C ${i} pull; done
nvim -c "lua require('lazy').sync({wait = true})"
}
function upgrade() {
case $(lsb_release -si) in
Gentoo) eix-sync && eix-update && emerge -avuNDU @world ;;
VoidLinux) xbps-install -Su && xbps-remove -RoO && xlocate -S ;;
esac
}

6
config/zsh/ssh.zsh Normal file
View File

@ -0,0 +1,6 @@
if [[ ($uname -a) = "Darwin" ]]; then
function ssh() {
osascript -e 'display notification "Touch the YubiKey" with title "2fa required"'
/opt/homebrew/bin/ssh $*
}
fi