|
|
sfeed_curses.1 - sfeed_curses - sfeed curses UI (now part of sfeed, development is in sfeed) |
|
|
 |
git clone git://git.codemadness.org/sfeed_curses (git://git.codemadness.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
README |
|
|
 |
LICENSE |
|
|
|
--- |
|
|
|
sfeed_curses.1 (9815B) |
|
|
|
--- |
|
|
|
1 .Dd August 10, 2021 |
|
|
|
2 .Dt SFEED_CURSES 1 |
|
|
|
3 .Os |
|
|
|
4 .Sh NAME |
|
|
|
5 .Nm sfeed_curses |
|
|
|
6 .Nd curses UI for viewing feed data |
|
|
|
7 .Sh SYNOPSIS |
|
|
|
8 .Nm |
|
|
|
9 .Op Ar |
|
|
|
10 .Sh DESCRIPTION |
|
|
|
11 .Nm |
|
|
|
12 formats feed data (TSV) from |
|
|
|
13 .Xr sfeed 1 |
|
|
|
14 from stdin or for each |
|
|
|
15 .Ar file |
|
|
|
16 into a curses UI. |
|
|
|
17 If one or more |
|
|
|
18 .Ar file |
|
|
|
19 arguments are specified then the basename of the |
|
|
|
20 .Ar file |
|
|
|
21 is used as the feed name in the output such as the feeds sidebar. |
|
|
|
22 The |
|
|
|
23 .Ar file |
|
|
|
24 arguments are processed and shown in the specified argument order in the feeds |
|
|
|
25 sidebar. |
|
|
|
26 If no |
|
|
|
27 .Ar file |
|
|
|
28 arguments are specified then the data is read from stdin and the feed name is |
|
|
|
29 "stdin" and no sidebar is visible by default in this case. |
|
|
|
30 .Pp |
|
|
|
31 Items with a timestamp from the last day compared to the system time at the |
|
|
|
32 time of loading the feed are marked as new and bold. |
|
|
|
33 There is also an alternative mode available to mark items as read by matching |
|
|
|
34 it against a list of URLs from a plain-text file. |
|
|
|
35 .Pp |
|
|
|
36 .Nm |
|
|
|
37 aligns the output. |
|
|
|
38 Make sure the environment variable |
|
|
|
39 .Ev LC_CTYPE |
|
|
|
40 is set to a UTF-8 locale, so it can determine the proper column-width |
|
|
|
41 per rune, using |
|
|
|
42 .Xr mbtowc 3 |
|
|
|
43 and |
|
|
|
44 .Xr wcwidth 3 . |
|
|
|
45 .Sh KEYBINDS |
|
|
|
46 .Bl -tag -width Ds |
|
|
|
47 .It k, ARROW UP |
|
|
|
48 Go one row up. |
|
|
|
49 .It j, ARROW DOWN |
|
|
|
50 Go one row down. |
|
|
|
51 .It K |
|
|
|
52 Go one row up and open the item. |
|
|
|
53 .It J |
|
|
|
54 Go one row down and open the item. |
|
|
|
55 .It h, ARROW LEFT |
|
|
|
56 Focus feeds pane. |
|
|
|
57 .It l, ARROW RIGHT |
|
|
|
58 Focus items pane. |
|
|
|
59 .It TAB |
|
|
|
60 Cycle focused pane (between feeds and items). |
|
|
|
61 .It g |
|
|
|
62 Go to the first row. |
|
|
|
63 .It G |
|
|
|
64 Go to the last row. |
|
|
|
65 .It PAGE UP, CTRL-B |
|
|
|
66 Scroll one page up. |
|
|
|
67 .It PAGE DOWN, CTRL-F, SPACE |
|
|
|
68 Scroll one page down. |
|
|
|
69 .It / |
|
|
|
70 Prompt for a new search and search forward (case-insensitive). |
|
|
|
71 .It ? |
|
|
|
72 Prompt for a new search and search backward (case-insensitive). |
|
|
|
73 .It n |
|
|
|
74 Search forward with the previously set search term. |
|
|
|
75 .It N |
|
|
|
76 Search backward with the previously set search term. |
|
|
|
77 .It \&[ |
|
|
|
78 Go to the previous feed in the feeds pane and open it. |
|
|
|
79 .It ] |
|
|
|
80 Go to the next feed in the feeds pane and open it. |
|
|
|
81 .It CTRL-L |
|
|
|
82 Redraw screen. |
|
|
|
83 .It R |
|
|
|
84 Reload all feed files which were specified as arguments on startup. |
|
|
|
85 .It m |
|
|
|
86 Toggle mouse-mode. |
|
|
|
87 It supports xterm X10 and extended SGR encoding. |
|
|
|
88 .It s |
|
|
|
89 Toggle between monocle layout and the previous non-monocle layout. |
|
|
|
90 .It < |
|
|
|
91 Use a fixed sidebar size for the current layout and decrease the fixed width or |
|
|
|
92 height by 1 column. |
|
|
|
93 .It > |
|
|
|
94 Use a fixed sidebar size for the current layout and increase the fixed width or |
|
|
|
95 height by 1 column. |
|
|
|
96 .It = |
|
|
|
97 Reset the sidebar size to automaticly adjust for the current layout. |
|
|
|
98 With the vertical layout the width is the longest feed name with the item |
|
|
|
99 counts right-aligned. |
|
|
|
100 With the horizontal layout the height is half of the window height (minus the |
|
|
|
101 statusbar) or otherwise the total amount of visible feeds, whichever fits the |
|
|
|
102 best. |
|
|
|
103 .It t |
|
|
|
104 Toggle showing only feeds with new items in the sidebar. |
|
|
|
105 .It a, e, @ |
|
|
|
106 Plumb URL of the enclosure. |
|
|
|
107 The URL is passed as a parameter to the program specified in |
|
|
|
108 .Ev SFEED_PLUMBER . |
|
|
|
109 .It o, ENTER, RETURN |
|
|
|
110 Feeds pane: load feed and its items. |
|
|
|
111 In the monocle layout it will also switch to the items pane after loading the |
|
|
|
112 feed items. |
|
|
|
113 Items pane: plumb current item URL, the URL is passed as a parameter to |
|
|
|
114 the program specified in |
|
|
|
115 .Ev SFEED_PLUMBER . |
|
|
|
116 .It c, p, | |
|
|
|
117 Pipe the whole TAB-Separated Value line to a program. |
|
|
|
118 This program can be specified with |
|
|
|
119 .Ev SFEED_PIPER . |
|
|
|
120 .It y |
|
|
|
121 Pipe the TAB-Separated Value field for yanking the URL to a program. |
|
|
|
122 This program can be specified with |
|
|
|
123 .Ev SFEED_YANKER . |
|
|
|
124 .It E |
|
|
|
125 Pipe the TAB-Separated Value field for yanking the enclosure to a program. |
|
|
|
126 This program can be specified with |
|
|
|
127 .Ev SFEED_YANKER . |
|
|
|
128 .It r |
|
|
|
129 Mark item as read. |
|
|
|
130 This will only work when |
|
|
|
131 .Ev SFEED_URL_FILE |
|
|
|
132 is set. |
|
|
|
133 .It u |
|
|
|
134 Mark item as unread. |
|
|
|
135 This will only work when |
|
|
|
136 .Ev SFEED_URL_FILE |
|
|
|
137 is set. |
|
|
|
138 .It f |
|
|
|
139 Mark all items of the current loaded feed as read. |
|
|
|
140 This will only work when |
|
|
|
141 .Ev SFEED_URL_FILE |
|
|
|
142 is set. |
|
|
|
143 .It F |
|
|
|
144 Mark all items of the current loaded feed as unread. |
|
|
|
145 This will only work when |
|
|
|
146 .Ev SFEED_URL_FILE |
|
|
|
147 is set. |
|
|
|
148 .It 1 |
|
|
|
149 Set the current layout to a vertical mode. |
|
|
|
150 Showing a feeds sidebar to the left and the feed items to the right. |
|
|
|
151 .It 2 |
|
|
|
152 Set the current layout to a horizontal mode. |
|
|
|
153 Showing a feeds sidebar on the top and the feed items on the bottom. |
|
|
|
154 .It 3 |
|
|
|
155 Set the current layout to a monocle mode. |
|
|
|
156 Showing either a feeds or a feed items pane. |
|
|
|
157 .It q, EOF |
|
|
|
158 Quit |
|
|
|
159 .El |
|
|
|
160 .Sh MOUSE ACTIONS |
|
|
|
161 When mouse-mode is enabled the below actions are available. |
|
|
|
162 .Bl -tag -width Ds |
|
|
|
163 .It LEFT-CLICK |
|
|
|
164 Feeds pane: select and load the feed and its items. |
|
|
|
165 In the monocle layout it will also switch to the items pane after loading the |
|
|
|
166 feed items. |
|
|
|
167 Items pane: select item, when already selected then plumb it. |
|
|
|
168 .It RIGHT-CLICK |
|
|
|
169 Feeds pane: select feed, but do not load it. |
|
|
|
170 Items pane: pipe the item. |
|
|
|
171 .It SCROLL UP |
|
|
|
172 Scroll one page up. |
|
|
|
173 .It SCROLL DOWN |
|
|
|
174 Scroll one page down. |
|
|
|
175 .It FORWARD |
|
|
|
176 Switch to the items pane. |
|
|
|
177 .It BACKWARD |
|
|
|
178 Switch to the feeds pane. |
|
|
|
179 .El |
|
|
|
180 .Sh SIGNALS |
|
|
|
181 .Bl -tag -width Ds |
|
|
|
182 .It SIGHUP |
|
|
|
183 Reload all feed files which were specified as arguments on startup. |
|
|
|
184 .It SIGINT, SIGTERM |
|
|
|
185 Quit |
|
|
|
186 .It SIGWINCH |
|
|
|
187 Resize the pane dimensions relative to the terminal size. |
|
|
|
188 .El |
|
|
|
189 .Sh ENVIRONMENT VARIABLES |
|
|
|
190 .Bl -tag -width Ds |
|
|
|
191 .It Ev SFEED_AUTOCMD |
|
|
|
192 Read and process a sequence of keys as input commands from this environment |
|
|
|
193 variable first, afterwards read from stdin as usual. |
|
|
|
194 This can be useful to automate certain actions at the start. |
|
|
|
195 .It Ev SFEED_PIPER |
|
|
|
196 A program where the whole TAB-Separated Value line is piped to. |
|
|
|
197 By default this is "sfeed_content". |
|
|
|
198 .It Ev SFEED_PIPER_INTERACTIVE |
|
|
|
199 Handle the program interactively in the same terminal or not. |
|
|
|
200 If set to "1" then before execution it restores the terminal attributes and |
|
|
|
201 .Nm |
|
|
|
202 will wait until the program is finished. |
|
|
|
203 If set to "0" then it will suppress stdout and stderr output. |
|
|
|
204 By default this is set to "1". |
|
|
|
205 .It Ev SFEED_PLUMBER |
|
|
|
206 A program that receives the link URL or enclosure URL as a parameter. |
|
|
|
207 By default this is "xdg-open". |
|
|
|
208 .It Ev SFEED_PLUMBER_INTERACTIVE |
|
|
|
209 Handle the program interactively in the same terminal or not. |
|
|
|
210 If set to "1" then before execution it restores the terminal attributes and |
|
|
|
211 .Nm |
|
|
|
212 will wait until the program is finished. |
|
|
|
213 If set to "0" then it will suppress stdout and stderr output. |
|
|
|
214 For example this option is useful to open a text-mode browser in the same |
|
|
|
215 terminal. |
|
|
|
216 By default this is set to "0". |
|
|
|
217 .It Ev SFEED_YANKER |
|
|
|
218 A program where the URL or enclosure field is piped to, to copy it to a |
|
|
|
219 clipboard. |
|
|
|
220 By default this is "xclip -r". |
|
|
|
221 .It Ev SFEED_YANKER_INTERACTIVE |
|
|
|
222 Handle the program interactively in the same terminal or not. |
|
|
|
223 If set to "1" then before execution it restores the terminal attributes and |
|
|
|
224 .Nm |
|
|
|
225 will wait until the program is finished. |
|
|
|
226 If set to "0" then it will suppress stdout and stderr output. |
|
|
|
227 By default this is set to "0". |
|
|
|
228 .It Ev SFEED_URL_FILE |
|
|
|
229 If this variable is set then a different mode is used to mark items as read, |
|
|
|
230 instead of checking the timestamp, which is the default. |
|
|
|
231 The value specified is a plain-text file containing a list of read URLs, one |
|
|
|
232 URL per line. |
|
|
|
233 This URL is matched on the link field if it is set, otherwise it is matched on |
|
|
|
234 the id field. |
|
|
|
235 .It Ev SFEED_MARK_READ |
|
|
|
236 A program to mark items as read if |
|
|
|
237 .Ev SFEED_URL_FILE |
|
|
|
238 is also set, if unset the default program used is "sfeed_markread read". |
|
|
|
239 The marked items are piped to the program line by line. |
|
|
|
240 If the feed item has a link then this line is the link field, otherwise it is |
|
|
|
241 the id field. |
|
|
|
242 The program is expected to merge items in a safe/transactional manner. |
|
|
|
243 The program should return the exit status 0 on success or non-zero on failure. |
|
|
|
244 .It Ev SFEED_MARK_UNREAD |
|
|
|
245 A program to mark items as unread if |
|
|
|
246 .Ev SFEED_URL_FILE |
|
|
|
247 is also set, if unset the default program used is "sfeed_markread unread". |
|
|
|
248 The unmarked items are piped to the program line by line. |
|
|
|
249 If the feed item has a link then this line is the link field, otherwise it is |
|
|
|
250 the id field. |
|
|
|
251 The program is expected to merge items in a safe/transactional manner. |
|
|
|
252 The program should return the exit status 0 on success or non-zero on failure. |
|
|
|
253 .It Ev SFEED_LAZYLOAD |
|
|
|
254 Lazyload items when reading the feed data from files. |
|
|
|
255 This can reduce memory usage but increases latency when seeking items, |
|
|
|
256 especially on slower disk drives. |
|
|
|
257 It can also cause a race-condition issue if the feed data on disk is changed |
|
|
|
258 while having the UI open and offsets for the lines are different. |
|
|
|
259 A workaround for the race-condition issue is by sending the SIGHUP signal to |
|
|
|
260 .Nm |
|
|
|
261 directly after the data was updated. |
|
|
|
262 This forces |
|
|
|
263 .Nm |
|
|
|
264 to reload the latest feed data and update the correct line offsets. |
|
|
|
265 By default this is set to "0". |
|
|
|
266 .It Ev SFEED_FEED_PATH |
|
|
|
267 This variable is set by |
|
|
|
268 .Nm |
|
|
|
269 when a feed is loaded. |
|
|
|
270 If the data was read from stdin this variable is unset. |
|
|
|
271 It can be used by the plumb or pipe program for scripting purposes. |
|
|
|
272 .El |
|
|
|
273 .Sh EXIT STATUS |
|
|
|
274 .Ex -std |
|
|
|
275 .Sh EXAMPLES |
|
|
|
276 .Bd -literal |
|
|
|
277 sfeed_curses ~/.sfeed/feeds/* |
|
|
|
278 .Ed |
|
|
|
279 .Pp |
|
|
|
280 Another example which shows some of the features |
|
|
|
281 .Nm |
|
|
|
282 has: |
|
|
|
283 .Bd -literal |
|
|
|
284 export SFEED_AUTOCMD="2tgo" |
|
|
|
285 export SFEED_URL_FILE="$HOME/.sfeed/urls" |
|
|
|
286 [ -f "$SFEED_URL_FILE" ] || touch "$SFEED_URL_FILE" |
|
|
|
287 sfeed_curses ~/.sfeed/feeds/* |
|
|
|
288 .Ed |
|
|
|
289 .Pp |
|
|
|
290 Which does the following: |
|
|
|
291 .Bl -enum |
|
|
|
292 .It |
|
|
|
293 Set the current layout to a horizontal mode ('2' keybind'). |
|
|
|
294 Showing a feeds sidebar on the top and the feed items on the bottom. |
|
|
|
295 .It |
|
|
|
296 Toggle showing only feeds with new items in the sidebar ('t' keybind). |
|
|
|
297 .It |
|
|
|
298 Go to the first row in the current panel ('g' keybind). |
|
|
|
299 .It |
|
|
|
300 Load the current selected feed ('o' keybind'). |
|
|
|
301 .It |
|
|
|
302 Set a file to use for managing read and unread items. |
|
|
|
303 This file is a plain-text file containing a list of read URLs, one URL per |
|
|
|
304 line. |
|
|
|
305 .It |
|
|
|
306 Check if this file for managing the read and unread items exists. |
|
|
|
307 If it doesn't exist yet then create an empty file. |
|
|
|
308 .It |
|
|
|
309 Start |
|
|
|
310 .Nm . |
|
|
|
311 .El |
|
|
|
312 .Sh SEE ALSO |
|
|
|
313 .Xr sfeed 1 , |
|
|
|
314 .Xr sfeed_content 1 , |
|
|
|
315 .Xr sfeed_markread 1 , |
|
|
|
316 .Xr sfeed_plain 1 , |
|
|
|
317 .Xr xclip 1 , |
|
|
|
318 .Xr sfeed 5 |
|
|
|
319 .Sh AUTHORS |
|
|
|
320 .An Hiltjo Posthuma Aq Mt hiltjo@codemadness.org |
|