I'm working with LaTex and I'm using a text editor that, when I compile LaTeX files, runs a script to open the compiled pdf in Preview. The trouble is that Preview opens in the same default dimensions every time, which covers up other applications I have open.

It's not a huge deal, but it would be nice to have Preview open flushed right and as half the width of the screen every time. Since I'm opening and closing it so often, moving it and resizing it every time gets really annoying.

I realize this isn't a built-in option for Preview, but is there any way of doing it using Terminal or otherwise? I've googled around and haven't found any satisfactory answers yet.

2 Answers 2


You might want to check out this question: What window management options exist for OS X?

My recommendation, if you want it to be fully automatic, is to use Slate.

Slate is no longer in active development, but it still works and is highly customizable. Put this code in a .slate.js file in your home directory:

var rightHalf = slate.operation("move", {
   "x" : "screenSizeX/2+screenOriginX",
   "y" : "screenOriginY",
   "width" : "screenSizeX/2",
   "height" : "screenSizeY"
slate.on("windowOpened", function(event, win) {
    if (win.app().name() === "Preview") {
  • Thanks! This .slate.js didn't seem to work on my end. Did I make a mistake? I don't know javascript, so I don't know if there's a syntax error. In any case, I found a slightly less optimal, but working, solution. It's an app called Spectacle that binds certain keys to window configs, one of which is what I want for Preview. Worst coming to worst, I can just use that every time Preview pops up.
    – gdavtor
    Aug 31, 2014 at 4:19
  • @gdavtor: I think we just found a bug in Slate. It's strange, but apparently you have to use doOperation or it won't work.
    – 0942v8653
    Aug 31, 2014 at 11:37
  • Very odd... I still can't get it to work.
    – gdavtor
    Aug 31, 2014 at 17:25
  • @gdavtor: Are you sure you enabled accessibility for it?
    – 0942v8653
    Aug 31, 2014 at 20:34
  • Yes I just made sure. It isn't even throwing errors when I put gibberish in the .js file.
    – gdavtor
    Aug 31, 2014 at 21:15

You might also look into iSnap and Moom.

They're window manager applications. You can set preferences to snap windows to a particular location and or size & shape. Better Touch Tool also has a version of this functionality. These apps provide shortcuts essentially to having windows go where and how you want them to be displayed.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .