

Ask HN: A way to switch from job to leisure apps on Mac instantly - fosron

Hey Ask HN,<p>so i have an interesting question - i need an app to switch off&#x2F;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&#x27;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&#x27;s an app for that?<p>TL;DR:<p>Need an app to close&#x2F;open apps from predefined list.<p>Thanks!
======
EdwardMSmith
Set up two different accounts and log out/in between them.

Set the various programs you need to start automatically (from dock, options
-> open on login)

Fast user switching:
[http://webcache.googleusercontent.com/search?q=cache:6BNJS4W...](http://webcache.googleusercontent.com/search?q=cache:6BNJS4W0_94J:support.apple.com/kb/PH13942+&cd=3&hl=en&ct=clnk&gl=us&client=safari)

~~~
fosron
Still, won't the apps stay in memory? And i don't really like the idea of
different users...

~~~
EdwardMSmith
With fast user switching, yes, but if you log out, then it shouldn't.

~~~
fosron
Hm, still, not the best solution...

------
0942v8653

        $ 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

------
adam419
If it's a Mac create a separate desktop instance, one work related the other
personal.

~~~
fosron
As i said, i need a way to close apps, leaving them on is not an option.

