Discussion:
[iterm2-discuss] change tab color progmatically (ie. from shell commands)
Iftah Haimovitch
2018-08-01 13:30:47 UTC
Permalink
When I ssh to one server I change the tab color to red and when I ssh to
another server I change the tab color to green -

Currently I do it manually which is error prone.

is there some shell command to change the tab color?
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
George Nachman
2018-08-01 19:04:27 UTC
Permalink
Install shell integration and utilities (from the iTerm2) menu and you'll
get it2setcolor. You can also get it from here:

https://github.com/gnachman/iterm2-website/blob/master/source/utilities/it2setcolor

To set the tab color use:

it2setcolor tab c84

where the last argument is a hex RGB triple.
Post by Iftah Haimovitch
When I ssh to one server I change the tab color to red and when I ssh to
another server I change the tab color to green -
Currently I do it manually which is error prone.
is there some shell command to change the tab color?
--
You received this message because you are subscribed to the Google Groups
"iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Richard Mitchell
2018-08-01 22:47:08 UTC
Permalink
I have a bash script that lets me set the tab color based on names.

I tried attaching it, we'll see how that goes.
Post by George Nachman
Install shell integration and utilities (from the iTerm2) menu and you'll
https://github.com/gnachman/iterm2-website/blob/master/source/utilities/it2setcolor
it2setcolor tab c84
where the last argument is a hex RGB triple.
Post by Iftah Haimovitch
When I ssh to one server I change the tab color to red and when I ssh to
another server I change the tab color to green -
Currently I do it manually which is error prone.
is there some shell command to change the tab color?
--
You received this message because you are subscribed to the Google Groups
"iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Richard Mitchell
2018-08-01 22:53:44 UTC
Permalink
Oh yeah, and in tcsh I have a completion setup:

complete it_tab 'p/*/`it_tab -l`/'

that allows me to type: it_tab blue[TAB]
and see all of the colors beginning with blue.
Post by Richard Mitchell
I have a bash script that lets me set the tab color based on names.
I tried attaching it, we'll see how that goes.
Post by George Nachman
Install shell integration and utilities (from the iTerm2) menu and you'll
https://github.com/gnachman/iterm2-website/blob/master/source/utilities/it2setcolor
it2setcolor tab c84
where the last argument is a hex RGB triple.
Post by Iftah Haimovitch
When I ssh to one server I change the tab color to red and when I ssh
to another server I change the tab color to green -
Currently I do it manually which is error prone.
is there some shell command to change the tab color?
--
You received this message because you are subscribed to the Google
Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Iftah Haimovitch
2018-08-02 23:26:57 UTC
Permalink
Excellent, thank you George and Richard!
Post by Richard Mitchell
complete it_tab 'p/*/`it_tab -l`/'
that allows me to type: it_tab blue[TAB]
and see all of the colors beginning with blue.
Post by Richard Mitchell
I have a bash script that lets me set the tab color based on names.
I tried attaching it, we'll see how that goes.
Post by George Nachman
Install shell integration and utilities (from the iTerm2) menu and
https://github.com/gnachman/iterm2-website/blob/master/source/utilities/it2setcolor
it2setcolor tab c84
where the last argument is a hex RGB triple.
Post by Iftah Haimovitch
When I ssh to one server I change the tab color to red and when I ssh
to another server I change the tab color to green -
Currently I do it manually which is error prone.
is there some shell command to change the tab color?
--
You received this message because you are subscribed to the Google
Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...