sfeed_curses-ui.md - www.codemadness.org - www.codemadness.org saait content files
(HTM) git clone git://git.codemadness.org/www.codemadness.org
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
sfeed_curses-ui.md (5058B)
---
1 sfeed_curses is a curses UI front-end for [sfeed](sfeed.html).
2 It is now part of sfeed.
3
4 It shows the TAB-separated feed items in a graphical command-line UI. The
5 interface has a look inspired by the [mutt mail client](http://www.mutt.org/). It has a sidebar
6 panel for the feeds, a panel with a listing of the items and a small statusbar
7 for the selected item/URL. Some functions like searching and scrolling are
8 integrated in the interface itself.
9
10
11 ## Features
12
13 * Relatively few LOC, about 2.5K lines of C.
14 * Few dependencies: a C compiler and a curses library (typically ncurses).
15 It also requires a terminal (emulator) which supports UTF-8.
16 * xterm-compatible shim [minicurses.h](https://git.codemadness.org/sfeed/file/minicurses.h.html)
17 * Easy to customize by modifying the small source-code and shellscripts.
18 * Plumb support: open the URL or an enclosure URL directly with any program.
19 * Pipe support: pipe the selected Tab-Separated Value line to a program for
20 scripting purposes. Like viewing the content in any way you like.
21 * Yank support: copy the URL or an enclosure URL to the clipboard.
22 * Familiar keybinds: supports both vi-like, emacs-like and arrow keys for
23 actions.
24 * Mouse support: it supports xterm X10 and extended SGR encoding.
25 * Support two ways of managing read/unread items.
26 By default sfeed_curses marks the feed items of the last day as new/bold.
27 Alternatively a simple plain-text list with the read URLs can be used.
28 * UI layouts: supports vertical, horizontal and monocle (full-screen) layouts.
29 Useful for different kind of screen sizes.
30 * Auto-execute keybind commands at startup to automate setting a preferred
31 layout, toggle showing new items or other actions.
32
33
34 Like the format programs included in sfeed you can run it by giving the feed
35 files as arguments like this:
36
37 sfeed_curses ~/.sfeed/feeds/*
38
39 ... or by reading directly from stdin:
40
41 sfeed_curses < ~/.sfeed/feeds/xkcd
42
43 It will show a sidebar if one or more files are specified as parameters. It
44 will not show the sidebar by default when reading from stdin.
45
46 [](downloads/screenshots/sfeed_curses_screenshot.png)
47
48 On pressing the 'o' or ENTER keybind it will open the link URL of an item with
49 the plumb program. On pressing the 'a', 'e' or '@' keybind it will open the
50 enclosure URL if there is one. The default plumb program is set to [xdg-open](https://portland.freedesktop.org/doc/xdg-open.html),
51 but can be modified by setting the environment variable $SFEED_PLUMBER. The
52 plumb program receives the URL as a command-line argument.
53
54 The TAB-Separated-Value line of the current selected item in the feed file can
55 be piped to a program by pressing the 'c', 'p' or '|' keybind. This allows much
56 flexibility to make a content formatter or write other custom actions or views.
57 This line is in the exact same format as described in the sfeed(5) man page.
58
59 The pipe program can be changed by setting the environment variable
60 $SFEED_PIPER.
61
62 [](downloads/screenshots/sfeed_curses_pipe_screenshot.png)
63
64 The above screenshot shows the included [sfeed_content](https://git.codemadness.org/sfeed/file/sfeed_content.html) shellscript which uses
65 the [lynx text-browser](https://invisible-island.net/lynx/) to convert HTML to plain-text. It pipes the formatted
66 plain-text to the user $PAGER (or "less").
67
68 Of course the script can be easily changed to use a different browser or
69 HTML-to-text converter like:
70
71 * [dillo](https://www.dillo.org/)
72 * [links](http://www.jikos.cz/~mikulas/links/)
73 * [w3m](http://w3m.sourceforge.net/)
74 * [webdump](https://git.codemadness.org/webdump/file/README.html)
75
76 It's easy to modify the color-theme by changing the macros in the source-code
77 or set a predefined theme at compile-time. The README file contains information
78 how to set a theme. On the left a [TempleOS](https://templeos.org/)-like color-theme on the right a
79 [newsboat](https://newsboat.org/)-like colorscheme.
80
81 [](downloads/screenshots/sfeed_curses_theme_screenshot.png)
82
83 It supports a vertical layout, horizontal and monocle (full-screen) layout.
84 This can be useful for different kind of screen sizes. The keybinds '1', '2'
85 and '3' can be used to switch between these layouts.
86
87 [](downloads/screenshots/sfeed_curses_horizontal_screenshot.png)
88
89
90 ## Clone
91
92 git clone git://git.codemadness.org/sfeed
93
94
95 ## Browse
96
97 You can browse the source-code at:
98
99 * <https://git.codemadness.org/sfeed/>
100 * <gopher://codemadness.org/1/git/sfeed>
101
102
103 ## Download releases
104
105 Releases are available at:
106
107 * <https://codemadness.org/releases/sfeed/>
108 * <gopher://codemadness.org/1/releases/sfeed>
109
110
111 ## Build and install
112
113 $ make
114 # make install