• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Separate colors for backgrounds

Jun 4, 2013
8
0
#1
Forgive me if this is already a feature. I would like to see an option to change the coloring for separate tabs so they each have a different theme. I sometimes have way too many tabs open and this would greatly help me to quickly differentiate between them. Separate fonts would also be good.
 
May 20, 2008
427
2
#2
If you want to manage a set of tab/pid related settings, you could do something like this (untested):
Code:
function mod=%@eval[%1-%2*%@int[%1/%2]
switch %@mod[%_pid, %NumInSet]
case 0
   rem set colors for set item 0
case 1
  rem set colors for set item 1
case ... up to num in set -1    or
default
  rem set some default colors
endswitch
That would use the unique PID of the TCC session to select a different one from a set of colors you have created. If you prefer something a little more orderly, you could track the TCC tab id as it is created and use that instead of %_pid.

To track my TCC shells as created, I use this:
Code:
REM In start btm, set shellcount for TCC # and use alias/shralias to track across TCC processes
set /a ShellCount=%@word[-0,%@alias[Shells]]+1
alias Shells=%@alias[Shells] %ShellCount%.

REM In exit btm, remove TCC # shellcount value from shells alias
alias Shells=%@trim[%@replace[ %ShellCount.,,%@alias[Shells]]
In the mod function call above, you could then use %ShellCount instead of %_pid. That would let the colors be selected more predictably.

This might not have all of the features you want, but it should have some of them.
 
Jun 4, 2013
8
0
#3
If you want to manage a set of tab/pid related settings, you could do something like this (untested):
Code:
function mod=%@eval[%1-%2*%@int[%1/%2]
switch %@mod[%_pid, %NumInSet]
case 0
   rem set colors for set item 0
case 1
  rem set colors for set item 1
case ... up to num in set -1    or
default
  rem set some default colors
endswitch
That would use the unique PID of the TCC session to select a different one from a set of colors you have created. If you prefer something a little more orderly, you could track the TCC tab id as it is created and use that instead of %_pid.

To track my TCC shells as created, I use this:
Code:
REM In start btm, set shellcount for TCC # and use alias/shralias to track across TCC processes
set /a ShellCount=%@word[-0,%@alias[Shells]]+1
alias Shells=%@alias[Shells] %ShellCount%.

REM In exit btm, remove TCC # shellcount value from shells alias
alias Shells=%@trim[%@replace[ %ShellCount.,,%@alias[Shells]]
In the mod function call above, you could then use %ShellCount instead of %_pid. That would let the colors be selected more predictably.

This might not have all of the features you want, but it should have some of them.
Sorry if I come off as a NOOB but I am. I am not sure how to do what you are saying. I love the product though. I wish it also had powershell support and splitview. If you could elaborate on the coloring/fonts you posted I would appreciate it. Thanks in advance for putting up with my noobness.
 
May 20, 2008
427
2
#4
You can look in the TCC help for the COLOR and FONT commands. Those will explain how to set colors and fonts in TCC. You can also look at the @COLOR and @FONT functions for getting information on the current settings. If you can define a set of different colors and fonts you wish to use, with one color command and font command per set item, the above code would let you create TCMD tabs with a possibility of a different theme per tab. If you don't want theme selection to be random, you can modify that code to switch on the %1 arg to the BTM is used instead of the more random %_pid in the modulo function that is defined. If you put the code in my first post in a SetTheme.BTM file, it will give you a start at something to play, learn, and experiment with.
 
Top Bottom