… | |
… | |
33 | } |
33 | } |
34 | }); |
34 | }); |
35 | }; |
35 | }; |
36 | |
36 | |
37 | for ($text) { |
37 | for ($text) { |
|
|
38 | $add_button->("rot13" => sub { y/A-Za-z/N-ZA-Mn-za-m/ }); |
|
|
39 | |
|
|
40 | urxvt::safe |
|
|
41 | and $add_button->("eval perl expression" => sub { $_ = eval urxvt::untaint $_ }); |
|
|
42 | |
38 | /^(\S+):(\d+):?$/ |
43 | /^(\S+):(\d+):?$/ |
39 | and $add_button->("vi-commands to load '$1'" => sub { s/^(\S+):(\d+):?$/\x1b:e $1\x0d:$2\x0d/ }); |
44 | and $add_button->("vi-commands to load '$1'" => sub { s/^(\S+):(\d+):?$/\x1b:e $1\x0d:$2\x0d/ }); |
|
|
45 | |
40 | /%[0-9a-fA-F]{2}/ && !/%[^0-9a-fA-F]/ && !/%.[^0-9a-fA-F]/ |
46 | /%[0-9a-fA-F]{2}/ && !/%[^0-9a-fA-F]/ && !/%.[^0-9a-fA-F]/ |
41 | and $add_button->("uri unescape" => sub { s/%([0-9a-fA-F]{2})/chr hex $1/ge }); |
47 | and $add_button->("uri unescape" => sub { s/%([0-9a-fA-F]{2})/chr hex $1/ge }); |
|
|
48 | |
42 | /^(http|ftp|telnet|irc|news):\// |
49 | /^(http|ftp|telnet|irc|news):\// |
43 | and $add_button->("run x-www-browser" => sub { system "x-www-browser \Q$_\E &" }); |
50 | and $add_button->("run x-www-browser" => sub { system "x-www-browser \Q$_\E &" }); |
44 | } |
51 | } |
45 | |
52 | |
46 | $popup->show; |
53 | $popup->show; |