urxvt-selection-popup(1)
π NAME π
selection-popup β selection management pop-up
ok bestie, this is the urxvt-selection-popup(1) page from the RXVT-UNICODE manual, and it's literally about a pop-up that manages your selection π
π DESCRIPTION π
okay so here's the tea: this thing binds a popup menu to Ctrl-Button3 (Ctrl+Button3). That popup lets you paste the X selections, and then either modify or use the internal selection text in various ways β depending on content π. We're talking uri unescaping, perl evaluation, web-browser starting, etc. β it's giving "selection text but make it do tricks" β¨
Other extensions can extend this popup menu by pushing a code reference onto @{ $term->{selection_popup_hook} }. That hook gets called whenever the popup is being displayed. main character energy for your extensions, fr fr π«Ά
Its sole argument is the popup menu, which can be modified. The selection is in $_, which can be used to decide whether to add something or not. It should either return nothing, or return a string and a code reference. The string will be used as button text, and the code reference will be called when the button gets activated β and it should transform $_. slay π
The following will add an entry "a to b" that transforms all "a"s in the selection to "b"s, but only if the selection currently contains any "a"s:
push @{ $self->{term}{selection_popup_hook} }, sub {
/a/ ? ("a to b" => sub { s/a/b/g }
: ()
};
ok that's it bestie, this page was from version 9.31, dated 2023-12-02 β mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: rxvt-unicode 9.31-bp160.1.13 Β· GPL-3.0-or-later
- opensuse-leap 16.0: rxvt-unicode 9.31-bp160.1.13 Β· GPL-3.0-or-later
- opensuse-leap 16.0: rxvt-unicode 9.31-bp160.1.13 Β· GPL-3.0-or-later
- opensuse-leap 16.0: rxvt-unicode 9.31-bp160.1.13 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms