Created
August 31, 2017 00:32
-
-
Save igolden/b287a695d3526832408fbebd7d520b5b to your computer and use it in GitHub Desktop.
Set the iTerm background programatically
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
# Changes the background color of | |
# iTerm window using applescript | |
# | |
# @param colorMatrix {Object} -- {100,0,0} | |
# | |
# @usage adjustBackground "{100,0,0}" | |
adjustBackground() { | |
osascript -e "tell application \"iTerm\" | |
set current_terminal to (current terminal) | |
tell current_terminal | |
set current_session to (current session) | |
tell current_session | |
set background color to $1 | |
end tell | |
end tell | |
end tell" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment