Skip to content

iTerm Applescripting automation is really fun, and really powerful. And not easy.

License

Notifications You must be signed in to change notification settings

supermitch/iterm-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

iTerm Scripts

🍏 iTerm Applescripting automation is fun.

Compiling Applescript

Plaintext .applescript files should be compiled into binary .scpt files to use them happily.

My preference is just to write them in Apple's Script Editor, and compile & export as a script.

If you insist on using your own editor, compile via osacompile -o filename.scpt filename.applescript.

Script Libraries

To create importable libraries, put them in: ~/Library/Script Libraries/

  • You may have to create that folder
  • These files must be compiled .scpt format

iTerm2 Scripts

Put .scpt scripts in: ~/Library/Application Support/iTerm2/Scripts/

When you restart iTerm2 you should now see a Scripts menu option.

Go nuts!

Bash Aliases

Simply put something like the following into your .bashrc or .zshrc:

alias six="osascript ~/Libary/Application Support/iTerm2/Scripts/six_sessions.scpt "

With aliases, you can pass args to your scripts, e.g. six 101.

See this example script for more info.

About

iTerm Applescripting automation is really fun, and really powerful. And not easy.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published