A comment on a previous post got me thinking — why do I always drop to a Windows command prompt? Why don’t I make more use of the Cygwin bash shell? The shell script language is more structured than batch files (more flow control options, etc.)…
I decided to change over to using a Cygwin bash shell as the command prompt my keyboard shortcut is set up to drop me to. At some point, though, all the output in the shell was colored blue. Not liking this, I searched around and ended up with a better solution than I expected to get.
- Used the Cygwin setup program to install the rxvt package
- Created .Xdefaults as Ambrósio suggests:
! ~/.Xdefaults - X default resource settings Rxvt*geometry: 120x60 Rxvt*background: #000020 Rxvt*foreground: #ffffbf !Rxvt*borderColor: Blue !Rxvt*scrollColor: Blue !Rxvt*troughColor: Gray Rxvt*scrollBar: True Rxvt*scrollBar_right: True Rxvt*font: Lucida Console-12 Rxvt*saveLines: 10000 Rxvt*loginShell: True ! VIM-like colors Rxvt*color0: #000000 Rxvt*color1: #FFFFFF Rxvt*color2: #00A800 Rxvt*color3: #FFFF00 Rxvt*color4: #0000A8 Rxvt*color5: #A800A8 Rxvt*color6: #00A8A8 Rxvt*color7: #D8D8D8 Rxvt*color8: #000000 Rxvt*color9: #FFFFFF Rxvt*color10: #00A800 Rxvt*color11: #FFFF00 Rxvt*color12: #0000A8 Rxvt*color13: #A800A8 Rxvt*color14: #00A8A8 Rxvt*color15: #D8D8D8 ! eof
- Created my cygwin.bat replacement, calling it cygwin-rxvt.cmd
- Placed a shortcut to cygwin-rxvt.cmd on my desktop and modified gave it the keyboard shortcut that had formerly launched a Windows command prompt (to get me in the habit of using this)
The rxvt terminal is resizable in the horizontal and vertical direction without having to go to the system menu, properties, and looks pretty nice! Maybe now I’ll more easily notice when a problem would lend itself to being solved by a shell script.
Finally, Ben sends a link to the Advanced Bash-Scripting Guide — thanks! Looks like a good resource I’ve been missing.