title: How to change colors programmatically in Konsole based on current directory?
body: <p>I currently use a color scheme based on which directory that I'm working in.  I manually open up a Konsole shell and then cd into a directory and got to Settings and change the color scheme.</p>
  
  <p>What I would like to do is have Konsole automatically set its foreground and background colors based on which directory I'm in.  Basically if I'm in any subdirectory below /home/me/src/java then I would like to use text white, background blue, for example.  If I'm below /home/me/src/documentation I want text black, background white, for example.  I would like the color change to occur automatically, programmatically, when I call the "cd" command.</p>
  
  <p>Is this possible?  If so, can you provide me some direction as to how?</p>
  
  <p>The way I see it I will need to be able to do a couple of things:  </p>
  
  <ul>
  <li>Be able to detect which Konsole the shell process (bash) is running in.</li>
  <li>Be able to tell Konsole, probably via API call, to change the color scheme on the fly.  </li>
  </ul>