Forked from MLKrisJohnson/Set Terminal Background Colors.applescript
Created
December 12, 2019 00:21
-
-
Save kristopherjohnson/79a9783b4d1d61abee090cfb1064027f 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 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