Last active
February 23, 2018 07:32
-
-
Save mdigan/6510737 to your computer and use it in GitHub Desktop.
Create a new iterm tab with a random background color
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| tell application "iTerm" | |
| activate | |
| tell the first terminal | |
| set mysession to (make new session at the end of sessions) | |
| -- talk to the session | |
| tell mysession | |
| set red to random number 65535 | |
| set green to random number 65535 | |
| set blue to random number 65535 | |
| -- set some attributes | |
| set name to "new" | |
| set background color to {red, green, blue} | |
| exec command "/bin/bash" | |
| end tell | |
| end tell | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment