Last active
June 16, 2016 22:55
-
-
Save fgimian/758c549e1858a2038ada to your computer and use it in GitHub Desktop.
Setting up the Terminal with JavaScript on OS X Yosemite
This file contains 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
#!/usr/bin/env osascript -l JavaScript | |
function run(argv) { | |
// Obtain the terminal application | |
terminal = Application('Terminal'); | |
// Set the font | |
terminal.defaultSettings.fontName = 'Source Code Pro for Powerline'; | |
terminal.defaultSettings.fontSize = 18; | |
terminal.defaultSettings.fontAntialiasing = true; | |
// Set the window size | |
terminal.defaultSettings.numberOfRows = 26; | |
terminal.defaultSettings.numberOfColumns = 130; | |
// Set the background color | |
terminal.defaultSettings.backgroundColor = {red: 0.1, green: 0.1, blue: 0.1}; | |
} |
@cbracco: I'm really sorry I never got a notification about your reply. You'll need to use the Script Editor and look through the API documentation there unfortunately.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@fgimian how did you find out the names of those settings (ie.
fontName
,fontSize
, etc)? I am trying to figure out how to set the line-height as well from this script.