#!/usr/bin/env perl # Written 2011 by Moritz Wilhelmy, mw aett wzff dot de # # This file is hereby placed in the public domain. There is no warranty. # # urxvt perl extension to escape tmux prefix character, i.e. replace all # occurrences of ` by `` when pasting into tmux (detected by matching the window # title) for convenience. sub on_tt_paste { my ($term, $paste) = @_; my ($type, $format, $wintitle) = $term->XGetWindowProperty($term->parent, $term->XInternAtom("WM_NAME")); $paste =~ s/`/``/g if $wintitle =~ m/^tmux /; $term->tt_paste($paste); 1 }