Skip to content

Instantly share code, notes, and snippets.

@andrewodri
Created November 29, 2017 10:37
Show Gist options
  • Save andrewodri/920f64277d61a9f37d928d7d2463a8eb to your computer and use it in GitHub Desktop.
Save andrewodri/920f64277d61a9f37d928d7d2463a8eb to your computer and use it in GitHub Desktop.
JXA Change Tab Background
let terminal = Application("Terminal")
terminal.includeStandardAdditions = true
let defaultBackground = terminal.defaultSettings.backgroundColor
let blueBackground = defaultBackground
terminal.windows[0].selectedTab.currentSettings.backgroundColor = blueBackground
terminal.displayDialog(terminal.windows[0].selectedTab.history.toString())
console.log(
// terminal.windows[0].frontmost
// terminal.windows[0].selectedTab.currentSettings.name.toString()
// terminal.windows.find(window => window.frontmost).selectedTab.contents
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment