Your sleep command could also iconify/minify the app's windows.
Just added -A and -S options that also minimize a window.
-a - Do pause/resume active window.
-A - Do pause/resume active window and minimize it.
-s - Do pause/resume interactively selected window.
-S - Do pause/resume interactively selected window and minimize it.
https://github.com/vermaden/scripts/commit/03591a138b14ceded...