Skip to content

Instantly share code, notes, and snippets.

@bolasblack
Last active August 29, 2015 14:07
Show Gist options
  • Save bolasblack/3a96477ba079bc164f46 to your computer and use it in GitHub Desktop.
Save bolasblack/3a96477ba079bc164f46 to your computer and use it in GitHub Desktop.
tell application "iTerm2"
activate
set windowCount to count of terminal windows
-- display dialog windowCount as text
if windowCount is 0 then
create window with default profile
delay 0.1
tell application "System Events"
tell process "iTerm2"
tell menu bar 1
tell menu bar item "View"
tell menu "View"
click menu item "Toggle Full Screen"
end tell
end tell
end tell
end tell
end tell
-- another way to full screen
--
-- tell application "System Events"
-- keystroke return using {command down}
-- end tell
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment