Set tab color via trigger
Feature Request
Summary
Trigger to set Tab Color.
I like to set some color-based indicator of whether I'm on a production/dev/local machine. This visual indicator helps prevent production accidents and generally reduces my own anxiety. On my own accounts, I'll do this through bashrc/zshrc because I'm the user that drags their dot-files everywhere.
I work on some systems where I cannot set the CLI prompt color, either because the system is incapable (vendor restrictions) or because it's a shared system and I don't muck with CLI prompt colors. This works great and I would like to extend this concept to the tab color to help me find prod/non-prod systems.
An additional menu option in the first image, to accomplish the second image.
Alternatives
This might be accomplishable via Python API today, but it seems like it'd be a lot more steps.
Concerns
-
Privacy - N/A
-
Performance - I think it should be roughly in line with other terminal triggers.
-
Memory - N/A
-
Complexity - There is probably a chance that this might result in some thrashing - I key off of terminal prompts. So if I have a single-tab open with multiple panes (one dev one prod), it could flip the bar from one color to another. I feel like this is something power-users would experience and know about. I intentionally do not run triggers in immediate mode (because it seems like there would be a performance hit) and just accept that.
-
Is this an instance of a more general problem?
The actual end-user use case is "I want iTerm to help me identify the kind of host I'm SSH'd into because my remote machine can't/won't set the prompt color itself and I want to shift that responsibility onto iTerm2".
Traditionally, I've heard people use different profiles for prod vs dev vs local. I tend not to use profiles because I just am just bad at deciding up front what a terminal window is going to be used for and sometimes that can change. That's why I want to lean on triggers to do it for me instead.
- Other considerations - I use triggers to color the prompt, but I might want to use the same pattern to color a tab. It might be worth it to allow for multiple actions on the same trigger. I'd consider this a separate feature though. Feel free to comment/advise and I can file a separate Feature Request.