August 21, 2018

AppleScript iTerm2

iTerm2 is a popular Terminal replacement for Apple’s Terminal application. It provides the ability to create profiles with unique text colors, window appearance and key mapping.

Here’s a simple Keyboard Maestro Macro to open a new Terminal Session from any application.

KM Postgres

AppleScript Code

tell application "iTerm"
set myString to "echo -ne "33]0;"Database Server"07"" set newWindow to (create window with profile "Postgres Server") tell current session of newWindow write text myString end tell end tell

Why Have This Macro?

This comes in handy when I want to open up iTerm2 and go to a specific site..I don't have to open up iTerm2 and then switch to the profile and then select the profile.

Comments

Add your Comments

Feel free to leave a comment about this post.

- Feel Free to add HTML to your comment!