Is it possible to change the primary screen for a Mac through command line?
The traditional way of doing this is from System Preferences > Displays and dragging the white menu bar on the top, between screens.
I have different setups at home and work and sometimes I need the primary display to be different. Rather than having to change this by dragging/dropping as explained above, I would like to run a script through a program like Alfred/QuickSilver and then just toggle/switch my primary displays.
If i could do this through command line, it would be awesome. There is this program called cscreen that allows me to do this, but it only runs on PowerMacs.
fs_usage
and track which preference file changes to record the choice of screen to host the menu bar. Once you've captured a version of that file for each layout, you could easily script that as a shell script. Also, try comparing the files in case it's just a trivial edit and the preference isn't somehow embedded in a data structure or otherwise not easily editable by a shell script.