sfeed_curses

[fork] sfeed (atom feed) reader
Log | Files | Refs | README | LICENSE

commit f7c5083439b9d9b54df347840ff54ccc0ba11118
parent 06713bd27e50e5f482d31147e92f870eea3e446e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 28 Jun 2020 20:31:31 +0200

add keybind y to yank url and keybind E to yank the enclosure url

Diffstat:
Msfeed_curses.1 | 8+++++++-
Msfeed_curses.c | 8+++++++-
2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/sfeed_curses.1 b/sfeed_curses.1 @@ -1,4 +1,4 @@ -.Dd June 24, 2020 +.Dd June 28, 2020 .Dt SFEED_CURSES 1 .Os .Sh NAME @@ -87,6 +87,12 @@ The url is passed as a parameter to the program specified in Pipe TAB-Separated Value line to a program. The line is piped to the program specified in .Ev SFEED_PIPER . +.It y +Pipe the TAB-Separated Value for yanking the url. +The used command to yank the url is "cut -f 3 | xclip -r". +.It E +Pipe the TAB-Separated Value for yanking the enclosure. +The used command to yank the enclosure is "cut -f 8 | xclip -r". .It q, EOF quit .El diff --git a/sfeed_curses.c b/sfeed_curses.c @@ -1583,11 +1583,17 @@ nextpage: case 'c': /* items: pipe TSV line to program */ case 'p': case '|': + case 'y': /* yank: pipe TSV line to yank url to clipboard */ + case 'E': /* yank: pipe TSV line to yank enclosure to clipboard */ if (selpane == PaneItems && panes[PaneItems].nrows) { p = &panes[PaneItems]; row = pane_row_get(p, p->pos); item = (struct item *)row->data; - pipeitem(piper, item); + switch (ch) { + case 'y': pipeitem("cut -f 3 | xclip -r", item); break; + case 'E': pipeitem("cut -f 8 | xclip -r", item); break; + default: pipeitem(piper, item); break; + } } break; case 4: /* EOT */