diff --git a/splitLAPTOP b/splitLAPTOP index 753012a..39a014a 100644 --- a/splitLAPTOP +++ b/splitLAPTOP @@ -30,7 +30,7 @@ if-shell -b 'test -n $TMUX' { # with mutt running in the first pane new-session -A -stoto -nmail 'mutt ; exec ${SHELL}' ## Split the first window for APT upgrade - split-window -h -p 25 -ttoto:1.1 'sudo apt update ; sudo aptitude full-upgrade ; sudo aptitude clean ; exec ${SHELL}' + split-window -h -p 25 -ttoto:1.1 'sudo apt update ; test $(apt list --upgradable 2>/dev/null | wc --lines) -gt 1 && { sudo aptitude full-upgrade ; sudo aptitude clean } ; exec ${SHELL}' # # Second window named **Xt0p** with btop running new-window -d -nXt0p 'btop ; exec ${SHELL}' diff --git a/splitWORKSTATION b/splitWORKSTATION index be09f32..41bce13 100644 --- a/splitWORKSTATION +++ b/splitWORKSTATION @@ -43,7 +43,8 @@ if-shell -b 'test -n $TMUX' { split-window -d -h -tjd:2.1 -c '/home/jegardai/repos/ipr.debops' # Third window for APT upgrade - new-window -nAPT 'sudo apt update ; sudo aptitude full-upgrade ; sudo aptitude clean ; exec ${SHELL}' + # Run upgrade only if packages to upgrade + 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' # Fourth window for authentication tools new-window -nAuth 'gpg --quiet --for-your-eyes-only --decrypt ~/.password-store/test.gpg ; logout'