This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cygwin tips&tricks] Shortcut to vim in "Send to" folder


Joshua Daniel Franklin wrote:

While I also prefer ~/.Xdefaults, there are other reasons why he might have those settings in the shortcut. Perhaps a different color scheme or font for the "Send to..." invocation (which I find very cool, by the way, I had forgotten about
that trick).

But that's *exactly* why I *do* use ~/.Xdefaults! As I said, give your resource a "class" name then use the class. For example:


! Global
*background:                Blue
*foreground:                Yellow
*font:                      "Lucida Console-*-16"
*saveLines:                 500
*colorBD:                   Blue
*colorUL:                   Red
*cursorColor:               Yellow

! Local Term
Local.background:           SteelBlue
Local.foreground:           White

! Remote term
Remote.background:          Maroon
Remote.foreground:          Yellow

! Editor window
EditWin.background:         Black
EditWin.foreground:         White

Then an rxvt with no opts specified will be yellow on blue, an rxvt -name Local will be white on steelblue, an rxvt -name Remote will be yellow on maroon and an rxvt -name EditWin will be white on black. All rxvt terminals inherit the font, saveLines, colorBD, etc attributes - only the background and foreground attributes are overridden in this example, though you could add additional resources to size, shape, change the font, etc - anything you can set via an option - and group them into classes. For example, you could define a "ConsoleLine" sort of window that say is wide and skinny (say 10x90) that you use to monitor a file via tail -f or to type in short command lines into, color it oddly or use a special small font, or even perhaps change the titlebar, placement, etc. Give this all a "class" name of "ConsoleLine" and specify it to rxvt's (or xterm's for that matter) -name option and off you go. Later on you could change the, say color scheme or font settings of what you want Remote to be and you don't have to change all your shortcuts - any ones that said -name Remote will automagically change.

Or, if you deal with many servers you might want to employ a scheme where you have a script starting a terminal and using -name $(hostname). Then for resource classes that you've defined a color scheme for it would come up in that color scheme (and for ones that you haven't it would come out in the default (global) foreground and background that you choose).

--
You never really learn to swear until you learn to drive.


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]