You are not logged in.

#1 2014-05-14 14:34:30

fmang
Member
From: France
Registered: 2012-08-14
Posts: 8
Website

[Patch] URL grabbing from keyboard in xterm

Hello,

I made a little patch for xterm that would enable me to use Alt+U to cycle through the links in my screen, yank them, and possibly open my browser.

Technically, it adds the select-needle action that locates the needle on the screen and performs a word selection on it. Using : // as a needle and a fancy charClass, it would select URLs.

The patch is available at http://files.mg0.fr/2014/05/14/xterm-needle.patch, or in the AUR.

Once you have the patched xterm, you need to tweak a few things in your ~/.Xresources:

xterm*charClass: 33:48,37-38:48,45-47:48,64:48,58:48,126:48,61:48,63:48,43:48,35:48
*VT100.Translations: #override \n\
        Alt <Key>u: select-needle("://") select-set(PRIMARY) \n\
        Alt <Key>o: exec-formatted("firefox '%t'", PRIMARY) select-start() select-end()

Using the configuration above, here's what you get: http://files.mg0.fr/2014/05/14/xterm-url.gif

Offline

Board footer

Powered by FluxBB