putty-color-themes icon indicating copy to clipboard operation
putty-color-themes copied to clipboard

Apply to certain saved sessions?

Open FurmanSK opened this issue 6 years ago • 2 comments

Is there a way to apply to certain saved sessions? I only see the ability to apply for all putty sessions.

FurmanSK avatar Aug 14 '18 14:08 FurmanSK

You can modify the reg file, editing the line that has the Sessions part to an already existing session:

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\session-name-you-want-to-apply]

That way, when you import the reg file it will be applied to only that saved session :-)

Source: https://superuser.com/a/766901

zetxek avatar Dec 06 '18 10:12 zetxek

zetxek fix doesn't work although it seems intuitive yes just put session-name-you-want-to-apply and you are done. However, the effect I am seeing is that all of my sessions are set to the color theme. That "session-name-you-want-to-apply" is not used nor the key prefix HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions. line 130 in _puttycolor.js is a recursive regex match for \(.*?) basically all subfolders.

We definitely would like to have a different color theme per session (red for production), blue for test, etc... A default _puttycolor.js IS good as is where it changes all defaults and all sessions You run that first and it changes scheme for all possible sessions including default.

Then copy _puttycolor.js to _puttycolor-.js...this name is arbitrary.

Then go to line 130 in _puttycolor-.js and look at the keyRegex , keyRegex = /Sessions\(.?)\Colour(.?)$/ the first (.?) should be changed to your session name or grabbed from that session-name-you-want-to-apply , keyRegex = /Sessions\yoursessionname\Colour(.?)$/

zoran3 avatar Mar 05 '19 17:03 zoran3