Recently I’ve been multiplexing work over many urxvt terminals: essential when you’re monitoring the logging output of several related binaries and managing several git branches related to each. The sensibilities of awesome have eased the window management, but I’ve become increasingly reliant on the window title to identify particular sessions. This is compounded one level further when I’m using screen; I want a useful identifier to show up in screen’s windowlist.
Getting nice prompts is a common need and there is plenty of information out there on setting your PS1, but for various reasons I’ve had problems finding a ‘nice’ setup that’s just worked exactly the way I’ve wanted it to with titles. Here are the pertinent parts of my working configuration:
- I get the working directory and current command in the title
- I get the title in the screen windowlist if running in screen
- I get the same title in the WM_NAME of an rxvt or xterm, or the titlebar of an iTerm2, whether or not screen is involved
Continue reading “window titles in screen and rxvt, from zsh”