Hey Ask HN,<p>so i have an interesting question - i need an app to switch off/on some predefined app list (something in lines of this). I have a Macbook Air which i use for work and for leisure at home, and i have an annoying repetitive task to do - kill all apps that i mostly don't need at home (IDE, Browser with work related tabs, GIT client, etc.) and then reopen them in the morning at work. I could leave them on, but my Mac starts to act a little crazy when i try to game a little (Yeah, on an Air) or do something else (4GB of RAM was not the best choice). It could probably be done with AppleScript (or something like that), but maybe there's an app for that?<p>TL;DR:<p>Need an app to close/open apps from predefined list.<p>Thanks!
Set up two different accounts and log out/in between them.<p>Set the various programs you need to start automatically (from dock, options -> open on login)<p>Fast user switching: <a href="http://webcache.googleusercontent.com/search?q=cache:6BNJS4W0_94J:support.apple.com/kb/PH13942+&cd=3&hl=en&ct=clnk&gl=us&client=safari" rel="nofollow">http://webcache.googleusercontent.com/search?q=cache:6BNJS4W...</a>
<p><pre><code> $ fun=( 'Preview' 'QuickTime Player' )
$ work=( 'Terminal' )
$ for i in "${fun[@]}"; do osascript -e "tell app \"$i\" to quit"; done
$ for i in "${work[@]}"; do open -a "$i"; done</code></pre>