Also run upgrade only if required
This commit is contained in:
parent
3e627904b9
commit
055244defb
|
@ -30,7 +30,7 @@ if-shell -b 'test -n $TMUX' {
|
||||||
# with mutt running in the first pane
|
# with mutt running in the first pane
|
||||||
new-session -A -stoto -nmail 'mutt ; exec ${SHELL}'
|
new-session -A -stoto -nmail 'mutt ; exec ${SHELL}'
|
||||||
## Split the first window for APT upgrade
|
## 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
|
# Second window named **Xt0p** with btop running
|
||||||
new-window -d -nXt0p 'btop ; exec ${SHELL}'
|
new-window -d -nXt0p 'btop ; exec ${SHELL}'
|
||||||
|
|
|
@ -43,7 +43,8 @@ if-shell -b 'test -n $TMUX' {
|
||||||
split-window -d -h -tjd:2.1 -c '/home/jegardai/repos/ipr.debops'
|
split-window -d -h -tjd:2.1 -c '/home/jegardai/repos/ipr.debops'
|
||||||
|
|
||||||
# Third window for APT upgrade
|
# 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
|
# Fourth window for authentication tools
|
||||||
new-window -nAuth 'gpg --quiet --for-your-eyes-only --decrypt ~/.password-store/test.gpg ; logout'
|
new-window -nAuth 'gpg --quiet --for-your-eyes-only --decrypt ~/.password-store/test.gpg ; logout'
|
||||||
|
|
Loading…
Reference in New Issue