Com um simples loop while
, sleep
ing entre:
while true; do osascript -e 'tell application "System Events" to set visible of every application process to false'; sleep 1; done
Se você tiver o Homebrew , instale watch
( brew install watch
) e, em seguida, ligue:
watch -n1 osascript -e 'tell application "System Events" to set visible of every application process to false'
... para executá-lo a cada segundo.