/usr/lib/urxvt/perl/option-popup is in rxvt-unicode 9.14-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | #! perl
sub on_start {
my ($self) = @_;
$self->grab_button (2, urxvt::ControlMask);
()
}
sub on_button_press {
my ($self, $event) = @_;
if ($event->{button} == 2 && $event->{state} & urxvt::ControlMask) {
my $popup = $self->popup ($event)
or return 1;
$popup->add_title ("Options");
$popup->add_separator;
my %unsafe = map +($_ => 1),
qw(borderLess console iconic loginShell reverseVideo
scrollBar scrollBar_floating scrollBar_right
secondaryScreen transparent utmpInhibit meta8
override_redirect);
for my $name (sort keys %urxvt::OPTION) {
next if $unsafe{$name};
my $optval = $urxvt::OPTION{$name};
$popup->add_toggle ($name => $self->option ($optval),
sub { $self->option ($optval, $_[0]) });
}
for my $hook (@{ $self->{term}{option_popup_hook} || [] }) {
if (my ($name, $value, $cb) = $hook->($popup)) {
$popup->add_toggle ($name => $value, sub { $cb->($_[0]) });
}
}
{
$popup->add_separator;
my $locale = $self->locale;
$locale =~ y/\x20-\x7e//cd;
$popup->add_title ("Locale: $locale");
}
$popup->show;
return 1;
}
()
}
|