delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/21/10:52:15

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: [cygwin tips&tricks] Shortcut to vim in "Send to" folder
Date: Wed, 21 Jul 2004 07:53:35 -0700
Lines: 58
Message-ID: <cdlvuf$ckg$1@sea.gmane.org>
References: <cdfoqh$c55$1 AT sea DOT gmane DOT org> <cdk54v$3f2$1 AT sea DOT gmane DOT org> <cb51e2e0407201524e5e28f7 AT mail DOT gmail DOT com>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: h-67-102-25-114.lsanca54.covad.net
User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626)
In-Reply-To: <cb51e2e0407201524e5e28f7@mail.gmail.com>
X-IsSubscribed: yes

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019