Skip to content

Instantly share code, notes, and snippets.

@denisbr
Created February 14, 2014 08:24
Show Gist options
  • Save denisbr/8997560 to your computer and use it in GitHub Desktop.
Save denisbr/8997560 to your computer and use it in GitHub Desktop.
Applescript used in an "Open new iTerm Window" Alfred action
on alfred_script(q)
tell application "iTerm"
activate
-- Create a new terminal window...
set myterm to (make new terminal)
-- ... and go on within this one.
tell myterm
-- Set the terminal size constraints.
set number of columns to 80
set number of rows to 42
-- Array/List which will hold all our sessions (empty
-- by default OFC).
set sessionList to {}
-- Create a few blank new sessions (will be replaced by
-- automatic calculations later, so that we'll have a
-- nice bar full with new tabs.)
repeat with i from 1 to 1 by 1
launch session "Default"
end repeat
-- DEBUG: print the session list.
return sessionList
end tell
-- set the bounds of the first window to {w, x, y, z}
end tell
end alfred_script
@chapter09
Copy link

When I have already got a full screen iTerm2 and run this script in Alfred, I will get a new iTerm2 window and moves to the full screen iTerm2 workspace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment