README - sfeed_curses - sfeed curses UI (now part of sfeed, development is in s… | |
git clone git://git.codemadness.org/sfeed_curses | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
README (4584B) | |
--- | |
1 sfeed_curses | |
2 ------------ | |
3 | |
4 sfeed_curses is a curses UI front-end for sfeed. | |
5 | |
6 It shows the TAB-separated feed items in a graphical command-line UI. The | |
7 interface has a look inspired by the mutt mail client. It has a sidebar … | |
8 for the feeds, a panel with a listing of the items and a small statusbar… | |
9 the selected item/URL. Some functions like searching and scrolling are | |
10 integrated in the interface itself. | |
11 | |
12 | |
13 Build and install | |
14 ----------------- | |
15 | |
16 $ make | |
17 # make install | |
18 | |
19 | |
20 Usage | |
21 ----- | |
22 | |
23 Like the format programs included in sfeed you can run it like this: | |
24 | |
25 sfeed_curses ~/.sfeed/feeds/* | |
26 | |
27 ... or by reading from stdin: | |
28 | |
29 sfeed_curses < ~/.sfeed/feeds/xkcd | |
30 | |
31 By default sfeed_curses marks the items of the last day as new/bold. To … | |
32 read/unread items in a different way a plain-text file with a list of th… | |
33 URLs can be used. To enable this behaviour the path to this file can be | |
34 specified by setting the environment variable $SFEED_URL_FILE to the URL… | |
35 | |
36 export SFEED_URL_FILE="$HOME/.sfeed/urls" | |
37 [ -f "$SFEED_URL_FILE" ] || touch "$SFEED_URL_FILE" | |
38 sfeed_curses ~/.sfeed/feeds/* | |
39 | |
40 There is a shellscript "sfeed_markread" to process the read and unread i… | |
41 See the man page for more detailed information. | |
42 | |
43 | |
44 Dependencies | |
45 ------------ | |
46 | |
47 - C compiler (C99). | |
48 - libc (recommended: C99 and POSIX >= 200809). | |
49 - curses (typically ncurses), optional but recommended: but see minicurs… | |
50 | |
51 | |
52 Optional dependencies | |
53 --------------------- | |
54 | |
55 - POSIX make(1) for Makefile. | |
56 - mandoc for documentation: https://mdocml.bsd.lv/ | |
57 | |
58 | |
59 Run-time dependencies | |
60 --------------------- | |
61 | |
62 - A (POSIX) shell. | |
63 - A terminal (emulator) supporting UTF-8 and the used capabilities. | |
64 | |
65 | |
66 Optional run-time dependencies | |
67 ------------------------------ | |
68 | |
69 - xclip for yanking the URL or enclosure. See $SFEED_YANKER to change it. | |
70 - xdg-open, used as a plumber by default. See $SFEED_PLUMBER to change i… | |
71 - awk, used by the sfeed_content and sfeed_markread script. | |
72 See the ENVIRONMENT VARIABLES section in the man page to change it. | |
73 - lynx, used by the sfeed_content script to convert HTML content. | |
74 See the ENVIRONMENT VARIABLES section in the man page to change it. | |
75 | |
76 | |
77 OS tested | |
78 --------- | |
79 | |
80 - Linux (compilers: clang, gcc, tcc, libc: glibc, musl). | |
81 - OpenBSD (clang, gcc). | |
82 - NetBSD | |
83 - FreeBSD | |
84 - DragonFlyBSD | |
85 - Illumos (OpenIndiana). | |
86 - Windows (cygwin gcc + mintty). | |
87 - HaikuOS | |
88 | |
89 | |
90 Known terminal issues | |
91 --------------------- | |
92 | |
93 Below lists some bugs or missing features in terminals that are found wh… | |
94 testing. Some of them might be fixed already upstream: | |
95 | |
96 - cygwin + mintty: the xterm mouse-encoding of the mouse position is bro… | |
97 scrolling. | |
98 - HaikuOS terminal: the xterm mouse-encoding of the mouse button number … | |
99 middle-button, right-button is incorrect / reversed. | |
100 - putty: the full reset attribute (ESC c, typically `rs1`) does not rese… | |
101 window title. | |
102 | |
103 | |
104 Color themes | |
105 ------------ | |
106 | |
107 To change the default theme you can set SFEED_THEME using make or in the | |
108 Makefile or include the a header file in sfeed_curses.c. See also the th… | |
109 directory. | |
110 | |
111 | |
112 Running custom commands inside the program | |
113 ------------------------------------------ | |
114 | |
115 Running commands inside the program can be useful for example to sync it… | |
116 mark all items across all feeds as read. It can be comfortable to have a | |
117 keybind for this inside the program to perform a scripted action and then | |
118 reload the feeds by sending the signal SIGHUP. | |
119 | |
120 In the input handling code you can then add a case: | |
121 | |
122 case 'M': | |
123 forkexec((char *[]) { "markallread.sh", NULL }, 0); | |
124 break; | |
125 | |
126 or | |
127 | |
128 case 'S': | |
129 forkexec((char *[]) { "syncnews.sh", NULL }, 1); | |
130 break; | |
131 | |
132 The specified script should be in $PATH or an absolute path. | |
133 | |
134 Example of a `markallread.sh` shellscript to mark all URLs as read: | |
135 | |
136 #!/bin/sh | |
137 # mark all items/URLs as read. | |
138 | |
139 tmp=$(mktemp) | |
140 (cat ~/.sfeed/urls; cut -f 3 ~/.sfeed/feeds/*) | \ | |
141 awk '!x[$0]++' > "$tmp" && | |
142 mv "$tmp" ~/.sfeed/urls && | |
143 pkill -SIGHUP sfeed_curses # reload feeds. | |
144 | |
145 Example of a `syncnews.sh` shellscript to update the feeds and reload th… | |
146 | |
147 #!/bin/sh | |
148 sfeed_update && pkill -SIGHUP sfeed_curses | |
149 | |
150 | |
151 Open an URL directly in the same terminal | |
152 ----------------------------------------- | |
153 | |
154 To open an URL directly in the same terminal using the text-mode lynx br… | |
155 | |
156 SFEED_PLUMBER=lynx SFEED_PLUMBER_INTERACTIVE=1 sfeed_curses ~/.s… | |
157 | |
158 | |
159 Yank to tmux buffer | |
160 ------------------- | |
161 | |
162 This changes the yank command to set the tmux buffer, instead of X11 xcl… | |
163 | |
164 SFEED_YANKER="tmux set-buffer \`cat\`" | |
165 | |
166 | |
167 License | |
168 ------- | |
169 | |
170 ISC, see LICENSE file. | |
171 | |
172 | |
173 Author | |
174 ------ | |
175 | |
176 Hiltjo Posthuma <[email protected]> |