Update: Add yay support

This commit is contained in:
gardouille 2024-06-13 14:25:11 +02:00
parent d1b2076adc
commit 5faa6f1c8a
Signed by: gardouille
GPG Key ID: E759BAA22501AF32

View File

@ -19,6 +19,7 @@ if-shell -b 'tmux has-session' {
# Run upgrade only if packages to upgrade # Run upgrade only if packages to upgrade
display-message "Create a new window for system update" display-message "Create a new window for system update"
if 'command -v apt' 'new-window -nAPT "sudo apt update ; test $(apt list --upgradable 2>/dev/null | wc --lines) -gt 1 && { sudo aptitude full-upgrade ; sudo aptitude clean } ; logout"' if 'command -v apt' 'new-window -nAPT "sudo apt update ; test $(apt list --upgradable 2>/dev/null | wc --lines) -gt 1 && { sudo aptitude full-upgrade ; sudo aptitude clean } ; logout"'
if 'command -v pacman' 'new-window -nPACMAN "sudo pacman --sync --refresh --; test $(pacman --query --upgrades -- 2>/dev/null | wc --lines) -gt 1 && { sudo pacman --sync --sysupgrade -- ; sleep 10 } ; logout"' if 'command -v pacman' 'new-window -nPACMAN "sudo pacman --sync --refresh --; test $(pacman --query --upgrades -- 2>/dev/null | wc --lines) -ge 1 && { sudo pacman --sync --sysupgrade -- ; sleep 10 } ; logout"'
if 'command -v yay' 'split-window -v -d "echo Wait for checking AUR upgrades… ; sleep 5 ; yay --sync --refresh --aur --; test $(yay --query --upgrades --aur -- 2>/dev/null | wc --lines) -ge 1 && { sleep 5 ; yay --sync --sysupgrade --aur -- ; sleep 10 } ; logout"'
} }
# }}} # }}}