Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'SSH_HOST: New Version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
SSH_HOST: New Version
Authored by: mingking on Aug 23, '05 06:01:16PM
Very nice indeed. But of course I needed some tweaks :-) - since my terminal windows start out with custom colors, I wanted to save the current settings and then restore them on cleanup.

So far I added the following to the set_color() function:

orig_color=`osascript -e 'tell application "Terminal" to tell (first window whose name contains "'$window_name'") to get background color'`

and in the cleanup function I changed the resetting of the color to:

set_color "$orig_color"

Next I'll probably add support for setting the foreground text color. And then probably the hightlight color, cursor color etc, since those need to all track each other. Should be straightforward now given this template. This is something I've wanted/needed for a while. I kept making mistakes by entering commands to the wrong machine - but no more. Thanks for the kick start!

Then, how 'bout a version that works in an xterm? I often use an xterm so that I can launch remote X apps. Unfortunately AppleScript won't be available in that case. Any ideas? Ideally it would all be in one script...

[ Reply to This | # ]