zsh-users
 help / color / mirror / code / Atom feed
* Changing mintty background color based on directory?
@ 2012-03-14 18:25 reckoner
  2012-03-14 18:31 ` Mikael Magnusson
  0 siblings, 1 reply; 2+ messages in thread
From: reckoner @ 2012-03-14 18:25 UTC (permalink / raw)
  To: Zsh Users

Hi,

I am using zsh (version 4.3.10) on cygwin with mintty as the terminal. 
Is it possible to change the background color of mintty when I change 
directories? One can change the colors in mintty on the fly by sending 
escape sequences as described here:

http://code.google.com/p/mintty/wiki/Tips#Changing_colours

I just don't know how to get this to work w/ zsh as the directory is 
changed.

Thanks!


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Changing mintty background color based on directory?
  2012-03-14 18:25 Changing mintty background color based on directory? reckoner
@ 2012-03-14 18:31 ` Mikael Magnusson
  0 siblings, 0 replies; 2+ messages in thread
From: Mikael Magnusson @ 2012-03-14 18:31 UTC (permalink / raw)
  To: reckoner; +Cc: Zsh Users

On 14 March 2012 19:25, reckoner <reckoner@gmail.com> wrote:
> Hi,
>
> I am using zsh (version 4.3.10) on cygwin with mintty as the terminal. Is it
> possible to change the background color of mintty when I change directories?
> One can change the colors in mintty on the fly by sending escape sequences
> as described here:
>
> http://code.google.com/p/mintty/wiki/Tips#Changing_colours
>
> I just don't know how to get this to work w/ zsh as the directory is
> changed.

The chpwd() function is called by zsh every time the current directory
changes, and all functions listed in the chpwd_functions array (ie,
chpwd_functions=( myfoo_chpwd ) would make myfoo_chpwd be called too).

-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-14 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-14 18:25 Changing mintty background color based on directory? reckoner
2012-03-14 18:31 ` Mikael Magnusson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).