RSS-feed

Sun, 09 Dec 2007

I want my terminals with their correct size


Let's say you are in your macosx and you want to start doing your work in the terminal. In my case, I use two terminals + screen. In one terminal I have always an ssh against a remote machine where I have my instance of irssi running. There, I can also check my email and IM to all the typical protocols (jabber, AOL, etc...). In the other Terminal window I have a session to another machine (It changes depending what machine I am working on).

The problem is that I want to create my two terminals and I want them to be in an exact position and with a particular size. Before writting this applescript, I had to that manually. Now I can run this from quicksilver and have my terminals ready:

tell application "Terminal"
  activate
  delay 1
  close window 1
  do script "ls"
  do script "ssh -t whatever.com screen -RD"
  set bounds of window 1 to {0, 0, 1240, 900}
  set bounds of window 2 to {110, -80, 1440, 700}
end tell

This is priceless.

posted at: 01:33 | path: /apple | permanent link to this entry