urxvt plugins

rxvt-unicode,支持 unicode 的 rxvt,多以 urxvt 名称出现。它集成了 perl 解释器(不需要外部 perl 环境?),提供了 API。你可以把这种用于定制 urxvt 行为的 perl 脚本称为扩展,我喜欢叫它插件。 urxvt 本身内置了若干插件,例如支持标签页的插件 tabbed、双击匹配并选中既定内容的插件 selection、单...

2011-03-15 · wuan

urxvt 插件一枚

在 urxvt 终端里左键选取一个单词,右键即刻翻译。 #! perl sub on_start { my ($self) = @_; $self->grab_button (3); () } sub on_button_press { my ($self, $event) = @_; if ($event->{button} == 3) { my $popup = $self->popup ($event) or return 1; my $word = $self->selection; my $title = $word; $title =~ s/[\x00-\x1f\x80-\x9f]/·/g; $title =~ s/\W//g; # 删除所有非英文字母 my @dict = `export LANG=zh_CN.UTF-8; /usr/bin/sdcv -n --utf8-output -u 'XDICT英汉辞典' "$title"` or return 2; splice(@dict, 0, 4);...

2011-03-09 · wuan

RT urxvt mouseless url yanking

RT @http://www.jukie.net/bart/blog/urxvt-url-yank 1$ wget <http://search.cpan.org/CPAN/authors/id/K/KI/KING/Clipboard-0.09.tar.gz> 2$ tar -zxf Clipboard-0.09.tar.gz; cd Clipboard-0.09 3$ apt-get install libspiffy-perl xclip 4$ perl Makefile.PL&& make all test && sudo make install

2010-05-17 · wuan

Using Mutt with Awesome

RT @http://awesome.naquadah.org/wiki/index.php?title=Irssi_tips 假设你用 awesome,也许你也用 urxvt,可能你还用 mutt,那么下面的技巧可能对你有用。 打开一个终端运行 mutt,并把这个终端放到某个 tag 里(假设这个 tag.name 是 4),然 后离开这个 tag4,确认在 mutt 配置的 timeout 时间内(默认10分钟)不进入 tag4。当你 看到 tag4 的标签背景色变红时,这就说...

2009-05-21 · wuan