Created
December 11, 2019 18:55
-
-
Save MLKrisJohnson/2c2433d342ae4b64918ee5d91ed3d120 to your computer and use it in GitHub Desktop.
AppleScript that sets background colors of terminal windows to different colors, for easier identification
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
-- Set background colors of terminal windows to different colors, for easier identification | |
tell application "Terminal" | |
set window_colors to {¬ | |
{8192, 0, 0}, ¬ | |
{0, 8192, 0}, ¬ | |
{0, 0, 8192}, ¬ | |
{4096, 4096, 0}, ¬ | |
{0, 4096, 4096}, ¬ | |
{4096, 0, 4096}, ¬ | |
{2048, 2048, 2048}} | |
set window_colors_count to count of window_colors | |
set i to 0 | |
repeat with current_window in windows | |
set color_index to (i mod window_colors_count) + 1 | |
set the_color to (item color_index of window_colors) | |
set background color of current_window to the_color | |
set i to i + 1 | |
end repeat | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment