The window bounds are a list of coordinates {left, top, right, bottom}. You probably intended "400" to be the width, but it's the position of the right edge of the window and 400 is to the left of 1105, so you get a minimum width window. Change 400 to 1105 plus the desired width, e.g., 1505.
But before you pursue this further, Terminal has a better solution for this: Window Groups. If you set up a group of windows and save them as a Window Group, each time you open that group it will create windows with the same layout and appearance.
Window > Save Windows as Group…
You can even tell Terminal to open a selected window group at startup:
Terminal > Preferences > Startup > On startup, open: > Window group:
(As a shortcut, when creating a window group there's a checkbox for making it the startup group.)
To automatically run particular commands in those windows, you can create custom settings profiles and specify the command with
Terminal > Preferences > Settings > [profile] > Shell > Startup > Run command:
then create each window with the appropriate profile.
Going further, in Mac OS X Lion 10.7 you can have window groups automatically restore commands without creating custom profiles, by creating the terminals using
Shell > New Command
instead of running the command inside the terminal shell. When creating the window group, you can check "Restore all commands". (By default, it will restore a small set of "safe" commands, but you must explicitly tell it if you want it to re-run all commands when opening the group.)
Moreover, Lion Terminal supports Resume and will automatically restore all your windows each time you open Terminal. It will even restore "safe" commands for terminals created with New Command.
Yes Thilo, there is a way. It will require a bit of command line wizardry though. As long as you're not allergic you can do the following:
- Open Terminal.app
Change directories to the location of the file you want to view using QuickLook.
- For example, if the file you want to view using QuickLook is on your desktop you would type: "
cd ~/Desktop
" (no quotes, caps matter, and ~ is a shortcut to your home directory).
Now type: "qlmanage -p filename.pdf" (replacing filename
with the name of your file and pdf
with the extension of your file).
A new icon will appear in your Dock called "qlmanage". This is the helper application that is usually launched headlessly by the Finder. By launching it from the command line it becomes accessible via the Dock, Command-Tab etc.
Just for the record (and the curios) this little application is stored deep in the OS where mortals are not meant to tread at this location:
/System/Library/Frameworks/QuickLook.framework/Versions/A/Resources/quicklookd.app/Contents/MacOS
Best Answer
Here's a little AppleScript I wrote to resize and reposition the Quick Look window so that it occupies the right one-third of the screen:
This requires that the appropriate application from within which this script is run (e.g. Script Editor, Keyboard Maestro, Better Touch Tool, etc.) is given assistive accessibility permissions, which (in High Sierra) you can grant in System Preferences > Security & Privacy > Privacy > Accessibility.