Skip to content

Instantly share code, notes, and snippets.

@fgimian
Last active June 16, 2016 22:55
Show Gist options
  • Save fgimian/758c549e1858a2038ada to your computer and use it in GitHub Desktop.
Save fgimian/758c549e1858a2038ada to your computer and use it in GitHub Desktop.
Setting up the Terminal with JavaScript on OS X Yosemite
#!/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};
}
@fgimian
Copy link
Author

fgimian commented Jun 16, 2016

@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