Plumbing extension for urxvt



Download the extension from and install it into /usr/lib/urxvt/perl. If you're not root, install it wherever you want and modify urxvt's perl-lib X resource.

Finally, modify urxvt's perl-ext resource to enable the plumb extension. You might also want to disable the matcher extension (which serves the same kind of purpose but has its own rules instead of consulting your plumber). An example .Xdefaults might include:

urxvt*perl-lib: /home/sqweek/lib/urxvt
urxvt*perl-ext: -matcher,plumb


Right clicking within the selection plumbs the selected text. Sweeping with the right button will plumb the sweeped text, without modifying the current selection. Right clicking outside the selection will plumb the white-space delimited word surrounding the click.

The plumb extension keeps track of the current directory by adopting p9p's convention, and assumes the window title looks like:


where /home/sqweek/ is the current directory, and nightingale is an optional arbitrary string containing no slashes (in this case my hostname). If the optional string is present, it must be delimited from the directory by a -. This is the same format set by awd.

Alternately, if you'd rather not mess around with window titles, Andy Spencer came up with a patch that tracks the working directory of the terminal's child process via /proc/<pid>/cwd. It will stop working if you spawn another shell (eg, 'screen', 'su') within the child process of course, but if you prefer the simpler strategy you can find that version here.