urxvt-selection-pastebin(1)
π selection-pastebin β automatic pastebin upload π
okay so bestie, welcome to urxvt-selection-pastebin(1), part of the RXVT-UNICODE manual fam π¦. This is a lil extension that does one specific slay little thing, and honestly? It's giving niche icon energy. Let's get into it β¨
πΈ EXAMPLES πΈ
Here's the whole vibe in one line, literally:
URxvt.keysym.C-M-e: selection-pastebin:remote-pastebin
that's it. that's the example. bind it and go π
β¨ DESCRIPTION β¨
okay so real talk: this is a little rarely-useful extension that uploads your selection as a textfile to a remote site (or does other things, honestly, it's flexible like that π«Ά).
π¨ important caveat, no cap: the implementation is not currently secure for use in a multiuser environment, because it writes to /tmp directly. So like... be aware of that. Read the room before you deploy it on a shared box, bestie π
It listens to the selection-pastebin:remote-pastebin action β and when that action gets activated, it runs a command with % replaced by the name of the textfile. You set that command via a resource, like this:
URxvt.selection-pastebin.cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.
and the default? yeah, the default is likely not useful to anybody but the few people around here :) β that's a direct quote from the manpage, we're keeping it, it's iconic π
Now, the name of the textfile is the hex encoded md5 sum of the selection β which is a whole vibe, because it means the same content should lead to the same filename. deterministic queen behavior π
After a successful upload, the selection gets replaced by the text given in the selection-pastebin-url resource (again, % is the placeholder for the filename, same energy as before):
URxvt.selection-pastebin.url: http://www.ta-sa.org/files/txt/%
π a note for the xrdb girlies π
Listen up, xrdb users, this one's for you:
xrdb uses the C preprocessor, which might interpret those double "/" characters as a comment start π. So instead of writing them straight, use "\057\057" β that works regardless of whether xrdb is used to parse the resource file or not. so fr fr, use that and you're golden π
β lowkey the whole extension in one sentence: it hashes your selection, drops it in a textfile, fires off your command, and swaps your selection for your URL template. cute, simple, a little chaotic. we stan π
and that's the page! β¨ this was written by the RXVT-UNICODE girlies, version 9.31, dated 2023-12-02 β mwah, ty for reading, ily, go upload a pastebin ππ
π¦ 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