Plumbing extension for urxvt
Requirements
- rxvt-unicode >= 6.3
- plan9port
Installation
Download the extension from http://sqweek.net/urxvt/plumb 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
Usage
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:
/home/sqweek/-nightingale
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.
Changes
- 2008-08-25: Fix bug when trying to plumb words that are split over multiple lines.
- 2008-07-24: Send the click attribute along with the plumbing message instead of trying to be smart about trimming the string (thanks grai!).