sfeed_curses, branch HEAD sfeed curses UI (now part of sfeed, development is in sfeed) af3c9ada0369b9a62414df5d5d99b972ab7a8fcb 2023-02-26T13:48:58Z 2023-02-26T13:48:58Z sfeed_curses is now part of sfeed Hiltjo Posthuma hiltjo@codemadness.org commit af3c9ada0369b9a62414df5d5d99b972ab7a8fcb parent 8e151ce48b503ad0ff0e24cb1be3bc93d6fbd895 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 26 Feb 2023 14:48:58 +0100 sfeed_curses is now part of sfeed sfeed_curses is now part of sfeed. There will be no more sfeed_curses updates in this repo. All updates will be in the upstream repo. Upstreams should track the following repo: https://git.codemadness.org/sfeed/ git://git.codemadness.org/sfeed 8e151ce48b503ad0ff0e24cb1be3bc93d6fbd895 2021-10-25T20:59:20Z 2021-10-25T21:07:45Z sfeed_content: optimizations Hiltjo Posthuma hiltjo@codemadness.org commit 8e151ce48b503ad0ff0e24cb1be3bc93d6fbd895 parent 7bf22e2b26d6e81c28404cc0230b7a0b6dee54c3 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 25 Oct 2021 22:59:20 +0200 sfeed_content: optimizations - Optimize the unescape() function. Use a temporary replacement character so escaping escape codes work correctly. The \x01 character cannot occur in the sfeed(5) data. - Optimize text decoding in gawk and other awk implementations that support unicode. This forces a simpler byte decoding and increases performance. This works because the sfeed(5) data is UTF-8. 7bf22e2b26d6e81c28404cc0230b7a0b6dee54c3 2021-10-24T18:59:50Z 2021-10-25T21:07:11Z sfeed_content: add link as base URL for HTML content Hiltjo Posthuma hiltjo@codemadness.org commit 7bf22e2b26d6e81c28404cc0230b7a0b6dee54c3 parent cdc9b56cff13200d3f6abe4401a308c38a99a70c Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 24 Oct 2021 20:59:50 +0200 sfeed_content: add link as base URL for HTML content This is useful for HTML viewers to use the base href as the base URL for relative links in the HTML content. cdc9b56cff13200d3f6abe4401a308c38a99a70c 2021-10-02T09:37:53Z 2021-10-02T09:37:53Z sfeed_curses.1: shuffle [ and ] documentation Hiltjo Posthuma hiltjo@codemadness.org commit cdc9b56cff13200d3f6abe4401a308c38a99a70c parent 03908db38236f1f8a565aa883dc3b0e714270f6d Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 2 Oct 2021 11:37:53 +0200 sfeed_curses.1: shuffle [ and ] documentation This makes sure the 'n', 'N', '/' and '?' search keybinds are grouped together. 03908db38236f1f8a565aa883dc3b0e714270f6d 2021-09-12T14:43:39Z 2021-09-12T14:43:39Z sfeed_curses.1: fix a small typo in the man page Hiltjo Posthuma hiltjo@codemadness.org commit 03908db38236f1f8a565aa883dc3b0e714270f6d parent 7e4b1bb5850bd99213d82b758117294aa5abae2d Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 12 Sep 2021 16:43:39 +0200 sfeed_curses.1: fix a small typo in the man page Thanks Matteo for reporting and sending the patch! 7e4b1bb5850bd99213d82b758117294aa5abae2d 2021-08-06T16:34:49Z 2021-08-06T17:58:31Z bump version to 1.0 Hiltjo Posthuma hiltjo@codemadness.org commit 7e4b1bb5850bd99213d82b758117294aa5abae2d parent b30727b888d7a088baca8afbc0470313d9bb4a20 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 6 Aug 2021 18:34:49 +0200 bump version to 1.0 b30727b888d7a088baca8afbc0470313d9bb4a20 2021-08-06T17:58:08Z 2021-08-06T17:58:31Z improve some wording Hiltjo Posthuma hiltjo@codemadness.org commit b30727b888d7a088baca8afbc0470313d9bb4a20 parent aadc489e0add931d4a1ae07f3faf699e1ec2cf5b Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 6 Aug 2021 19:58:08 +0200 improve some wording aadc489e0add931d4a1ae07f3faf699e1ec2cf5b 2021-08-06T16:21:03Z 2021-08-06T16:26:28Z add another example to the man page showing some features Hiltjo Posthuma hiltjo@codemadness.org commit aadc489e0add931d4a1ae07f3faf699e1ec2cf5b parent 938ec955883fe31ca92c3eb8b3217e246d07ceaa Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 6 Aug 2021 18:21:03 +0200 add another example to the man page showing some features 938ec955883fe31ca92c3eb8b3217e246d07ceaa 2021-08-06T15:57:22Z 2021-08-06T15:57:22Z fix another 2 grammar mistakes Hiltjo Posthuma hiltjo@codemadness.org commit 938ec955883fe31ca92c3eb8b3217e246d07ceaa parent fb4816aa2e60ead6749867ce3c729686d3d3cde2 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 6 Aug 2021 17:57:22 +0200 fix another 2 grammar mistakes fb4816aa2e60ead6749867ce3c729686d3d3cde2 2021-08-03T17:10:41Z 2021-08-03T17:10:41Z man page improvements Hiltjo Posthuma hiltjo@codemadness.org commit fb4816aa2e60ead6749867ce3c729686d3d3cde2 parent 4319fae1c096263c17bab392a66914ab0551018a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 3 Aug 2021 19:10:41 +0200 man page improvements 4319fae1c096263c17bab392a66914ab0551018a 2021-07-25T12:51:57Z 2021-07-25T12:52:45Z minicurses.h: fix parameter type for tparm() Hiltjo Posthuma hiltjo@codemadness.org commit 4319fae1c096263c17bab392a66914ab0551018a parent ea54b7b64b9a9c92108a2e1c680c426ca248e9cd Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 25 Jul 2021 14:51:57 +0200 minicurses.h: fix parameter type for tparm() It should be long, not int (POSIX). ea54b7b64b9a9c92108a2e1c680c426ca248e9cd 2021-07-25T12:36:53Z 2021-07-25T12:52:41Z check if capname is NULL for tparm() Hiltjo Posthuma hiltjo@codemadness.org commit ea54b7b64b9a9c92108a2e1c680c426ca248e9cd parent 8ebfb75d9ca26ce24a76aa3dc956182bd06f5b59 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 25 Jul 2021 14:36:53 +0200 check if capname is NULL for tparm() POSIX also does not specify NULL is allowed or not, so assume it isn't. https://pubs.opengroup.org/onlinepubs/7908799/xcurses/tigetflag.html This adds a wrapper to prevent NULL assertion in NetBSD curses/terminfo. netbsd-curses can use a diagnostic assert and aborts the program: https://github.com/oasislinux/netbsd-curses/blob/5b78297a1276a7d64c3be78d1e54251a1203a44a/lib/libterminfo/tparm.c http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/lib/libterminfo/tparm.c?rev=1.18&content-type=text/plain&only_with_tag=MAIN The current ncurses snapshot can show a trace call when the parameter is NULL, see the tparm_setup() function: https://github.com/ThomasDickey/ncurses-snapshots/blob/master/ncurses/tinfo/lib_tparm.c OpenBSD ncurses (older version), tparam_internal function does nothing if the parameter is NULL: http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib/libcurses/tinfo/lib_tparm.c?rev=1.9&content-type=text/plain Noticed on Oasis Linux which uses netbsd-curses and aborts when used in the terminal with the default $TERM=linux . 8ebfb75d9ca26ce24a76aa3dc956182bd06f5b59 2021-07-25T12:00:43Z 2021-07-25T12:47:09Z fix a false-positive warnings with gcc 10.2+ and -Wall -O2 Hiltjo Posthuma hiltjo@codemadness.org commit 8ebfb75d9ca26ce24a76aa3dc956182bd06f5b59 parent 40bfd7846f72a063eede961e578f0ae667727b3f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 25 Jul 2021 14:00:43 +0200 fix a false-positive warnings with gcc 10.2+ and -Wall -O2 These conditions cannot happen though. Noticed on Oasis Linux: https://github.com/oasislinux/oasis/blob/master/pkg/sfeed_curses/gen.lua See also commit 61c48746013c47d77b47c0b7606882983b185b6d 40bfd7846f72a063eede961e578f0ae667727b3f 2021-07-25T09:47:55Z 2021-07-25T09:52:56Z minor change: in usage change "parameter" to "argument" Hiltjo Posthuma hiltjo@codemadness.org commit 40bfd7846f72a063eede961e578f0ae667727b3f parent 9d3e0853cfb0d0b3c2b53838377e7b0b04fd1e7f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 25 Jul 2021 11:47:55 +0200 minor change: in usage change "parameter" to "argument" 9d3e0853cfb0d0b3c2b53838377e7b0b04fd1e7f 2021-07-24T21:13:53Z 2021-07-25T09:52:56Z sfeed_markread: use "-" instead of /dev/stdin Hiltjo Posthuma hiltjo@codemadness.org commit 9d3e0853cfb0d0b3c2b53838377e7b0b04fd1e7f parent a3c02678f80ec8c253ce680d36ae9bd4ee935d8c Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 24 Jul 2021 23:13:53 +0200 sfeed_markread: use "-" instead of /dev/stdin This is slightly more portable and specified in POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html section "STDIN". a3c02678f80ec8c253ce680d36ae9bd4ee935d8c 2021-07-24T20:56:59Z 2021-07-25T09:52:53Z man page improvements Hiltjo Posthuma hiltjo@codemadness.org commit a3c02678f80ec8c253ce680d36ae9bd4ee935d8c parent fc93b4fee3ca1aa3430458e848d2f37ff010074d Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 24 Jul 2021 22:56:59 +0200 man page improvements fc93b4fee3ca1aa3430458e848d2f37ff010074d 2021-07-24T20:52:41Z 2021-07-24T20:52:41Z sfeed_markread: simplify, always print all usage instructions Hiltjo Posthuma hiltjo@codemadness.org commit fc93b4fee3ca1aa3430458e848d2f37ff010074d parent e2a3071bb2729a3bc87db2322e351bc60fb4d9ff Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 24 Jul 2021 22:52:41 +0200 sfeed_markread: simplify, always print all usage instructions e2a3071bb2729a3bc87db2322e351bc60fb4d9ff 2021-07-24T20:39:57Z 2021-07-24T20:39:57Z sfeed_markread: allow to set the url as a parameter or as an env variable Hiltjo Posthuma hiltjo@codemadness.org commit e2a3071bb2729a3bc87db2322e351bc60fb4d9ff parent 84529dc8f6cdca8c83c7cb22e1c7d09aa2a0cbf6 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 24 Jul 2021 22:39:57 +0200 sfeed_markread: allow to set the url as a parameter or as an env variable 84529dc8f6cdca8c83c7cb22e1c7d09aa2a0cbf6 2021-07-24T20:38:55Z 2021-07-24T20:38:55Z sfeed_markread: for the unread comment: create the file if it does not exist Hiltjo Posthuma hiltjo@codemadness.org commit 84529dc8f6cdca8c83c7cb22e1c7d09aa2a0cbf6 parent 82e0cbb1afd2fff9654d1f0decff921537932038 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 24 Jul 2021 22:38:55 +0200 sfeed_markread: for the unread comment: create the file if it does not exist ...otherwise awk would error out and print an error message. 82e0cbb1afd2fff9654d1f0decff921537932038 2021-07-24T20:37:58Z 2021-07-24T20:37:58Z sfeed_content: allow multiple file parameters as arguments Hiltjo Posthuma hiltjo@codemadness.org commit 82e0cbb1afd2fff9654d1f0decff921537932038 parent 976c3d377d2c97129d7cf3477fcdcb02efa48e69 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 24 Jul 2021 22:37:58 +0200 sfeed_content: allow multiple file parameters as arguments ... just like the formatting programs. 976c3d377d2c97129d7cf3477fcdcb02efa48e69 2021-07-24T20:37:16Z 2021-07-24T20:37:16Z simplify header comment in scripts Hiltjo Posthuma hiltjo@codemadness.org commit 976c3d377d2c97129d7cf3477fcdcb02efa48e69 parent d4d23f32309713d4204f72845ee45b6a67256aaf Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 24 Jul 2021 22:37:16 +0200 simplify header comment in scripts For maintainability: the README lists the dependencies and the man page and README contains documentation. d4d23f32309713d4204f72845ee45b6a67256aaf 2021-07-24T20:35:23Z 2021-07-24T20:35:23Z sfeed_markread: make sure to use proper permissions Hiltjo Posthuma hiltjo@codemadness.org commit d4d23f32309713d4204f72845ee45b6a67256aaf parent ef0d1174e6339b3ce0a9b5ea16f392369a10b220 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 24 Jul 2021 22:35:23 +0200 sfeed_markread: make sure to use proper permissions Don't preserve permissions of tmp files by moving the file, so copy it. This could also print a warning on DragonFlyBSD when moving a file from /tmp. For a similar issue see sfeed commit bbe2f3fc9a4b7360ca20d71eaa973e8b1c30b0f6 for the sfeed_update script. ef0d1174e6339b3ce0a9b5ea16f392369a10b220 2021-07-22T14:54:14Z 2021-07-22T14:54:14Z sfeed_curses.1: add usage example Hiltjo Posthuma hiltjo@codemadness.org commit ef0d1174e6339b3ce0a9b5ea16f392369a10b220 parent 9f09a2ef6080f7b168af4c4b52dc092aa022fd02 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 22 Jul 2021 16:54:14 +0200 sfeed_curses.1: add usage example 9f09a2ef6080f7b168af4c4b52dc092aa022fd02 2021-07-16T10:28:17Z 2021-07-16T10:43:23Z sfeed_markread.1: some rewording and clarify it writes to SFEED_URL_FILE Hiltjo Posthuma hiltjo@codemadness.org commit 9f09a2ef6080f7b168af4c4b52dc092aa022fd02 parent 0ebfe4a085072376ad9604b8442f895569881a8a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 16 Jul 2021 12:28:17 +0200 sfeed_markread.1: some rewording and clarify it writes to SFEED_URL_FILE 0ebfe4a085072376ad9604b8442f895569881a8a 2021-07-14T16:06:33Z 2021-07-14T16:06:33Z code-style and consistency: remove unneeded return Hiltjo Posthuma hiltjo@codemadness.org commit 0ebfe4a085072376ad9604b8442f895569881a8a parent c01bf03a25c90f8bb623f60ec6fa7c961997debb Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 14 Jul 2021 18:06:33 +0200 code-style and consistency: remove unneeded return ... and change a return to break (no change intended). c01bf03a25c90f8bb623f60ec6fa7c961997debb 2021-07-14T15:58:29Z 2021-07-14T15:58:29Z urls_read: exit early if there is a read error Hiltjo Posthuma hiltjo@codemadness.org commit c01bf03a25c90f8bb623f60ec6fa7c961997debb parent b4c423045934c3a9562091b8cf2d5db888d3a136 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 14 Jul 2021 17:58:29 +0200 urls_read: exit early if there is a read error b4c423045934c3a9562091b8cf2d5db888d3a136 2021-07-14T15:57:38Z 2021-07-14T15:57:38Z item_row_get: exit early if there is a read error Hiltjo Posthuma hiltjo@codemadness.org commit b4c423045934c3a9562091b8cf2d5db888d3a136 parent 59bea5033b7176b6ae9554670bdd02cb76009fae Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 14 Jul 2021 17:57:38 +0200 item_row_get: exit early if there is a read error Only affected if SFEED_LAZYLOAD=1 and there is a read error reading the line. This used to silently ignore the error and show a blank line. 59bea5033b7176b6ae9554670bdd02cb76009fae 2021-07-14T15:57:20Z 2021-07-14T15:57:20Z feed_count: exit early if there is a read error Hiltjo Posthuma hiltjo@codemadness.org commit 59bea5033b7176b6ae9554670bdd02cb76009fae parent 74959a9fbbc0599ca3c1b43d435fd57f6af2b1ef Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 14 Jul 2021 17:57:20 +0200 feed_count: exit early if there is a read error 74959a9fbbc0599ca3c1b43d435fd57f6af2b1ef 2021-07-14T15:56:30Z 2021-07-14T15:56:30Z feed_items_get: simplify and exit earlier Hiltjo Posthuma hiltjo@codemadness.org commit 74959a9fbbc0599ca3c1b43d435fd57f6af2b1ef parent 768a524cd3bbfe7c225b08e539a6ba35f9464ecb Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 14 Jul 2021 17:56:30 +0200 feed_items_get: simplify and exit earlier This exits before free() or other calls which might reset errno also. 768a524cd3bbfe7c225b08e539a6ba35f9464ecb 2021-07-14T15:53:51Z 2021-07-14T15:53:51Z urls_read: exit early if opening the file with URLs fails Hiltjo Posthuma hiltjo@codemadness.org commit 768a524cd3bbfe7c225b08e539a6ba35f9464ecb parent 827f4afdcecbb6cb53ee60d52d068ce5f94bbaac Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 14 Jul 2021 17:53:51 +0200 urls_read: exit early if opening the file with URLs fails This now requires the URLs file (SFEED_URL_FILE) to exist, but it will not silently ignore the error if opening a file fails, for example with a permission issue. 827f4afdcecbb6cb53ee60d52d068ce5f94bbaac 2021-07-10T17:14:48Z 2021-07-10T17:14:48Z improve consistency of line counting (on an invalid file) Hiltjo Posthuma hiltjo@codemadness.org commit 827f4afdcecbb6cb53ee60d52d068ce5f94bbaac parent 1d4e2e3f6913318cdfce03f08bb517a8c8ebbc56 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 10 Jul 2021 19:14:48 +0200 improve consistency of line counting (on an invalid file) This only happens when there is an invalid sfeed(5) feed file with an empty line. The feed_items_get() function would stop further processing, but the feed_count() function did not. 1d4e2e3f6913318cdfce03f08bb517a8c8ebbc56 2021-07-10T16:39:48Z 2021-07-10T16:39:48Z bump version to 0.9.13 Hiltjo Posthuma hiltjo@codemadness.org commit 1d4e2e3f6913318cdfce03f08bb517a8c8ebbc56 parent 8d1ba2bee49f27f6d8d8273d075924b0f76b8496 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 10 Jul 2021 18:39:48 +0200 bump version to 0.9.13 8d1ba2bee49f27f6d8d8273d075924b0f76b8496 2021-07-07T16:14:40Z 2021-07-07T16:14:40Z fix typo: url -> URL Hiltjo Posthuma hiltjo@codemadness.org commit 8d1ba2bee49f27f6d8d8273d075924b0f76b8496 parent b624558593a0d366e17c083a7a238203d5a52472 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 7 Jul 2021 18:14:40 +0200 fix typo: url -> URL b624558593a0d366e17c083a7a238203d5a52472 2021-06-05T13:41:17Z 2021-06-05T13:41:17Z Makefile: switch to use CPPFLAGS -D_DEFAULT_SOURCE Hiltjo Posthuma hiltjo@codemadness.org commit b624558593a0d366e17c083a7a238203d5a52472 parent c665475737051568791b0c1f9c198e69aa94c644 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 5 Jun 2021 15:41:17 +0200 Makefile: switch to use CPPFLAGS -D_DEFAULT_SOURCE This fixes a warning on Linux glibc: /usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] 187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" | ^~~~~~~ Tested on Gentoo, Void GNU/Linux glibc with gcc. Tested on various other platforms for regressions too namely: OpenBSD, NetBSD, FreeBSD, Void GNU/Linux musl. c665475737051568791b0c1f9c198e69aa94c644 2021-06-03T15:02:29Z 2021-06-03T15:02:29Z bump version to 0.9.12 Hiltjo Posthuma hiltjo@codemadness.org commit c665475737051568791b0c1f9c198e69aa94c644 parent 7b644e71a5a08ba26bd420605310cdda33dac95f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 3 Jun 2021 17:02:29 +0200 bump version to 0.9.12 7b644e71a5a08ba26bd420605310cdda33dac95f 2021-05-30T10:30:18Z 2021-05-30T10:30:18Z mono_highlight: show items as bold when selected. Hiltjo Posthuma hiltjo@codemadness.org commit 7b644e71a5a08ba26bd420605310cdda33dac95f parent 434cd340170d74620aaaa1bc56e681d59cb56864 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 30 May 2021 12:30:18 +0200 mono_highlight: show items as bold when selected. bold + faint is not supported though, so new items won't be visible there. 434cd340170d74620aaaa1bc56e681d59cb56864 2021-05-30T10:01:05Z 2021-05-30T10:01:05Z theme: add a version of the mono theme which highlights the active panel Hiltjo Posthuma hiltjo@codemadness.org commit 434cd340170d74620aaaa1bc56e681d59cb56864 parent 215e57201ba7b6354cda15ed0904570b1b9277b4 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 30 May 2021 12:01:05 +0200 theme: add a version of the mono theme which highlights the active panel This may not work on terminals that do not support the faint attribute though. To compile and use it: make SFEED_THEME=mono_highlight 215e57201ba7b6354cda15ed0904570b1b9277b4 2021-05-30T09:59:33Z 2021-05-30T09:59:33Z add [ and ] keybind to open the next visible feed in the pane Hiltjo Posthuma hiltjo@codemadness.org commit 215e57201ba7b6354cda15ed0904570b1b9277b4 parent f649473b5f2146a7bcaa598f6314c2d44d8e3c4a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 30 May 2021 11:59:33 +0200 add [ and ] keybind to open the next visible feed in the pane Suggested and used by adc, thanks for the feedback! f649473b5f2146a7bcaa598f6314c2d44d8e3c4a 2021-04-29T16:06:34Z 2021-04-29T16:06:34Z bump version to 0.9.11 Hiltjo Posthuma hiltjo@codemadness.org commit f649473b5f2146a7bcaa598f6314c2d44d8e3c4a parent bed53f9cf8124b7fe556ac809e6479c017abfbbc Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 29 Apr 2021 18:06:34 +0200 bump version to 0.9.11 bed53f9cf8124b7fe556ac809e6479c017abfbbc 2021-04-21T15:02:38Z 2021-04-21T15:03:56Z sfeed_content: show any other content-type than "html" as plain-text Hiltjo Posthuma hiltjo@codemadness.org commit bed53f9cf8124b7fe556ac809e6479c017abfbbc parent 85d1802fa73cb7311c6c2a4c917fcd16f647fbed Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 21 Apr 2021 17:02:38 +0200 sfeed_content: show any other content-type than "html" as plain-text 85d1802fa73cb7311c6c2a4c917fcd16f647fbed 2021-04-19T22:22:47Z 2021-04-20T17:55:29Z sfeed_content: content view optimization Hiltjo Posthuma hiltjo@codemadness.org commit 85d1802fa73cb7311c6c2a4c917fcd16f647fbed parent 61c48746013c47d77b47c0b7606882983b185b6d Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 20 Apr 2021 00:22:47 +0200 sfeed_content: content view optimization - When there is no content or no "plain" or "html" content-type then: - Do not spawn a (HTML) converter program (optimization). - Do not try to unescape the text (small optimization). - Do not print a newline separator (visual). 61c48746013c47d77b47c0b7606882983b185b6d 2021-04-07T18:29:28Z 2021-04-07T18:29:28Z fix 2 false-positive warnings with gcc 10.2+ and -Wall -O2 Hiltjo Posthuma hiltjo@codemadness.org commit 61c48746013c47d77b47c0b7606882983b185b6d parent f0a76e0f90e04147b1199a9187c97c4727d240c4 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 7 Apr 2021 20:29:28 +0200 fix 2 false-positive warnings with gcc 10.2+ and -Wall -O2 These conditions cannot happen though. Noticed in the package for Oasis Linux: https://github.com/oasislinux/oasis/blob/master/pkg/sfeed_curses/gen.lua Thanks Michael Forney. f0a76e0f90e04147b1199a9187c97c4727d240c4 2021-03-31T18:14:04Z 2021-03-31T18:14:04Z bump version to 0.9.10 Hiltjo Posthuma hiltjo@codemadness.org commit f0a76e0f90e04147b1199a9187c97c4727d240c4 parent 551304948865eed4fe8402746a11f8b62757fdcc Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 31 Mar 2021 20:14:04 +0200 bump version to 0.9.10 551304948865eed4fe8402746a11f8b62757fdcc 2021-03-31T16:17:28Z 2021-03-31T16:30:18Z when the pane items or scrollbar are outside the window do not draw them Hiltjo Posthuma hiltjo@codemadness.org commit 551304948865eed4fe8402746a11f8b62757fdcc parent 9c7de6a70d87fd2c7a73e68bf73e13d6ac103243 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 31 Mar 2021 18:17:28 +0200 when the pane items or scrollbar are outside the window do not draw them This is reproducable in a horizontal window layout when the height of the items is 0 or 1 height. It also makes sure to draw the scrollbar to the side in a vertical layout. 9c7de6a70d87fd2c7a73e68bf73e13d6ac103243 2021-03-31T16:16:44Z 2021-03-31T16:30:18Z updategeom: just place the statusbar absolute on the bottom of the window Hiltjo Posthuma hiltjo@codemadness.org commit 9c7de6a70d87fd2c7a73e68bf73e13d6ac103243 parent 8434b8a25e88b432533280dc138369b65410ef9c Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 31 Mar 2021 18:16:44 +0200 updategeom: just place the statusbar absolute on the bottom of the window With the current calculation it could be calculated outside bounds in some very small window sizes. 8434b8a25e88b432533280dc138369b65410ef9c 2021-03-31T16:15:07Z 2021-03-31T16:29:27Z do not clearscreen when the window is dirty Hiltjo Posthuma hiltjo@codemadness.org commit 8434b8a25e88b432533280dc138369b65410ef9c parent 260ffbb1e60b8d2600b3467c98e7ec24a6e0f9a2 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 31 Mar 2021 18:15:07 +0200 do not clearscreen when the window is dirty When the window is set to dirty (win.dirty) then all things will/should be redrawn cleanly. This prevents some flickering in xterm and urxvt on clearscreen, like on a window resize or when adjusting the sidebar. 260ffbb1e60b8d2600b3467c98e7ec24a6e0f9a2 2021-03-31T16:14:12Z 2021-03-31T16:19:14Z updategeom: small code-style, similar to vertical layout Hiltjo Posthuma hiltjo@codemadness.org commit 260ffbb1e60b8d2600b3467c98e7ec24a6e0f9a2 parent e8baa8ef0f426922b49a941a18fa26f7b6bcc37e Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 31 Mar 2021 18:14:12 +0200 updategeom: small code-style, similar to vertical layout e8baa8ef0f426922b49a941a18fa26f7b6bcc37e 2021-03-31T16:13:01Z 2021-03-31T16:18:43Z do not draw a row, scrollbar or statusbar if its completely outside the window Hiltjo Posthuma hiltjo@codemadness.org commit e8baa8ef0f426922b49a941a18fa26f7b6bcc37e parent 3bc8fcc8b261f1b73d8b24d7a3f5cd8e2654ab78 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 31 Mar 2021 18:13:01 +0200 do not draw a row, scrollbar or statusbar if its completely outside the window The drawing of the row outside is reproducable if only 2 "dirty" rows are redrawn. 3bc8fcc8b261f1b73d8b24d7a3f5cd8e2654ab78 2021-03-30T16:04:58Z 2021-03-30T16:04:58Z improve a few code comments Hiltjo Posthuma hiltjo@codemadness.org commit 3bc8fcc8b261f1b73d8b24d7a3f5cd8e2654ab78 parent 0ca6c8a990047b290fec8fb201a18253fda4bde7 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 30 Mar 2021 18:04:58 +0200 improve a few code comments 0ca6c8a990047b290fec8fb201a18253fda4bde7 2021-03-29T18:07:10Z 2021-03-29T18:31:32Z make a feeds_row_get function to find the position Hiltjo Posthuma hiltjo@codemadness.org commit 0ca6c8a990047b290fec8fb201a18253fda4bde7 parent 65f7223309e929522ca4e3762604f10653db5aca Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 29 Mar 2021 20:07:10 +0200 make a feeds_row_get function to find the position 65f7223309e929522ca4e3762604f10653db5aca 2021-03-29T18:00:36Z 2021-03-29T18:31:32Z make plumb, pipe, yank a function and reuse them for keybinds and mouse actions Hiltjo Posthuma hiltjo@codemadness.org commit 65f7223309e929522ca4e3762604f10653db5aca parent edcbb556469e5381e61f0d733b95b472d55ecf44 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 29 Mar 2021 20:00:36 +0200 make plumb, pipe, yank a function and reuse them for keybinds and mouse actions edcbb556469e5381e61f0d733b95b472d55ecf44 2021-03-29T18:00:08Z 2021-03-29T18:31:32Z check row for NULL in feed_open_selected Hiltjo Posthuma hiltjo@codemadness.org commit edcbb556469e5381e61f0d733b95b472d55ecf44 parent c5c1f1c85a2a0fe44eab2786255dab73a2ca448a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 29 Mar 2021 20:00:08 +0200 check row for NULL in feed_open_selected This condition (being NULL) cannot happen here though. c5c1f1c85a2a0fe44eab2786255dab73a2ca448a 2021-03-29T17:58:53Z 2021-03-29T18:31:32Z remove unneeded casts for row->data Hiltjo Posthuma hiltjo@codemadness.org commit c5c1f1c85a2a0fe44eab2786255dab73a2ca448a parent 0cd539155ae12983a7ff1febd14b8c56774a85e7 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 29 Mar 2021 19:58:53 +0200 remove unneeded casts for row->data 0cd539155ae12983a7ff1febd14b8c56774a85e7 2021-03-29T17:56:16Z 2021-03-29T18:31:32Z after toggling showing new feeds or when reloading feeds try to select the same feed Hiltjo Posthuma hiltjo@codemadness.org commit 0cd539155ae12983a7ff1febd14b8c56774a85e7 parent 47e37f53d05797b18d2c6d2567187c28ac3f23ab Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 29 Mar 2021 19:56:16 +0200 after toggling showing new feeds or when reloading feeds try to select the same feed Before this would go back to the first position, which can be a little inconvenient when there are a lot of feeds. 47e37f53d05797b18d2c6d2567187c28ac3f23ab 2021-03-29T17:31:13Z 2021-03-29T17:34:07Z clamp height value in getsidebarsizedefault() Hiltjo Posthuma hiltjo@codemadness.org commit 47e37f53d05797b18d2c6d2567187c28ac3f23ab parent 542d8132811f4c139b40613a331ad049ccffb0d7 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 29 Mar 2021 19:31:13 +0200 clamp height value in getsidebarsizedefault() This fixes an case in the horizontal layout mode when there are no new items and only new feeds are shown (using the 't' keybind). The height would be shown as 1, but internally the sidebar height is set to 0 and it would then require 2 '>' keypresses to increase it from 1 to 2 height. A similar issue was in commit: 7d9d4d493a90bbd56bbe5cf175970a32ecb915bd The ranges are checked in adjustsidebarsize() already so remove clamping there. 542d8132811f4c139b40613a331ad049ccffb0d7 2021-03-26T17:22:51Z 2021-03-26T17:22:51Z markread: use a range-check for p->pos for one item, just in case Hiltjo Posthuma hiltjo@codemadness.org commit 542d8132811f4c139b40613a331ad049ccffb0d7 parent aedcc4d12d8a10a0411e82f8e002e3c08401b1bd Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 26 Mar 2021 18:22:51 +0100 markread: use a range-check for p->pos for one item, just in case aedcc4d12d8a10a0411e82f8e002e3c08401b1bd 2021-03-26T17:22:00Z 2021-03-26T17:22:00Z fix a comment, which was meant to be the opposite Hiltjo Posthuma hiltjo@codemadness.org commit aedcc4d12d8a10a0411e82f8e002e3c08401b1bd parent 6638160adb2c006ba386036173dc50dc63571e69 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 26 Mar 2021 18:22:00 +0100 fix a comment, which was meant to be the opposite 6638160adb2c006ba386036173dc50dc63571e69 2021-03-26T17:20:25Z 2021-03-26T17:20:25Z right-click plumb: use interactive flag Hiltjo Posthuma hiltjo@codemadness.org commit 6638160adb2c006ba386036173dc50dc63571e69 parent 26db62828804cef0fe6cc1db2afae6414311321e Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 26 Mar 2021 18:20:25 +0100 right-click plumb: use interactive flag This flag $SFEED_PIPER_INTERACTIVE was respected by the keybind but not by the mouse-click action. 26db62828804cef0fe6cc1db2afae6414311321e 2021-03-25T21:42:00Z 2021-03-25T21:56:32Z add keybinds to go one item up or down and open it Hiltjo Posthuma hiltjo@codemadness.org commit 26db62828804cef0fe6cc1db2afae6414311321e parent 263fecaf915f6ae1ea2b2fea1f599502c9500b20 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 25 Mar 2021 22:42:00 +0100 add keybinds to go one item up or down and open it Feedback idea from Hadrien Lacour, thanks! Change the text in the man page for the new layouts, which can be horizontal (up and down, instead of left and right): "Focus pane to the left (feeds)." -> "Focus feeds pane." "Focus pane to the right (items)." -> "Focus items pane." 263fecaf915f6ae1ea2b2fea1f599502c9500b20 2021-03-25T21:38:21Z 2021-03-25T21:38:21Z make a function for the common code for opening/plumbing a feed or item Hiltjo Posthuma hiltjo@codemadness.org commit 263fecaf915f6ae1ea2b2fea1f599502c9500b20 parent 031a577c39cdd4fcf518569d2ca7e869e646313f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 25 Mar 2021 22:38:21 +0100 make a function for the common code for opening/plumbing a feed or item The common code was in the mouse handling and key handling and it is large enough to be a separate function also. 031a577c39cdd4fcf518569d2ca7e869e646313f 2021-03-24T22:07:07Z 2021-03-25T00:48:15Z also allow scrolling when the position is exactly on the pane its scrollbar Hiltjo Posthuma hiltjo@codemadness.org commit 031a577c39cdd4fcf518569d2ca7e869e646313f parent 357de99788bf6760165d1934d4dc4838c18f1583 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 24 Mar 2021 23:07:07 +0100 also allow scrolling when the position is exactly on the pane its scrollbar 357de99788bf6760165d1934d4dc4838c18f1583 2021-03-24T21:45:19Z 2021-03-24T21:45:52Z fix scroll handling regression and remove ctrl+scroll feature to adjust sidebar Hiltjo Posthuma hiltjo@codemadness.org commit 357de99788bf6760165d1934d4dc4838c18f1583 parent 39fe4803fb3595e9425efae568c2e9a53f143a4c Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 24 Mar 2021 22:45:19 +0100 fix scroll handling regression and remove ctrl+scroll feature to adjust sidebar 39fe4803fb3595e9425efae568c2e9a53f143a4c 2021-03-24T17:15:14Z 2021-03-24T17:17:10Z fix mouse actions that don't depend on a position in a pane Hiltjo Posthuma hiltjo@codemadness.org commit 39fe4803fb3595e9425efae568c2e9a53f143a4c parent 64f10e20f6dce1cdf6ee517ab9ce12b39a192d5f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 24 Mar 2021 18:15:14 +0100 fix mouse actions that don't depend on a position in a pane - Fix forward and backward if the position is not in a pane (like the statusbar, linebar or scrollbar). - Add ctrl+scroll to change the sidebar size. 64f10e20f6dce1cdf6ee517ab9ce12b39a192d5f 2021-03-24T17:14:50Z 2021-03-24T17:17:10Z mouse: rename mask to keymask Hiltjo Posthuma hiltjo@codemadness.org commit 64f10e20f6dce1cdf6ee517ab9ce12b39a192d5f parent 5cfd4db8738430c39c711d117809f48635ec1578 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 24 Mar 2021 18:14:50 +0100 mouse: rename mask to keymask 5cfd4db8738430c39c711d117809f48635ec1578 2021-03-24T17:14:02Z 2021-03-24T17:17:07Z improve init() and cleanup() of terminal Hiltjo Posthuma hiltjo@codemadness.org commit 5cfd4db8738430c39c711d117809f48635ec1578 parent 0ead415f22016b33698476e9b7212ad51d63eb98 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 24 Mar 2021 18:14:02 +0100 improve init() and cleanup() of terminal - Do not call setupterm() more than once, this fixes a memory leak when spawning a program in interactive mode, which would call cleanup and setupterm(). setupterm() allocates memory in the ncurses implementation and will leak memory when used in this way. - Call updatetitle() after init(), if it was succesful. - Rename resettitle() to resetstate(). - Minor code-style changes and shuffling. 0ead415f22016b33698476e9b7212ad51d63eb98 2021-03-24T17:08:59Z 2021-03-24T17:08:59Z sfeed_curses.1: mention the specific encodings X10 and SGR Hiltjo Posthuma hiltjo@codemadness.org commit 0ead415f22016b33698476e9b7212ad51d63eb98 parent cb62fb68ea42d7ca3f52fee947077a0f35d8000a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 24 Mar 2021 18:08:59 +0100 sfeed_curses.1: mention the specific encodings X10 and SGR It does not use other encodings, for example extended X10 UTF-8 or urxvt encoding. But SGR should cover this functionalities. cb62fb68ea42d7ca3f52fee947077a0f35d8000a 2021-03-21T00:46:03Z 2021-03-21T00:46:03Z fix resizewin for serial consoles Hiltjo Posthuma hiltjo@codemadness.org commit cb62fb68ea42d7ca3f52fee947077a0f35d8000a parent 65449180719dd2c4d27f7370695b9e4eee9e5b72 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 21 Mar 2021 01:46:03 +0100 fix resizewin for serial consoles winsz.ws_col or winsz.ws_row can be 0. 65449180719dd2c4d27f7370695b9e4eee9e5b72 2021-03-21T00:45:24Z 2021-03-21T00:45:24Z minicurses: remove now unused code Hiltjo Posthuma hiltjo@codemadness.org commit 65449180719dd2c4d27f7370695b9e4eee9e5b72 parent 830e63da7d15879638f082e241ee489b895e7782 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 21 Mar 2021 01:45:24 +0100 minicurses: remove now unused code 830e63da7d15879638f082e241ee489b895e7782 2021-03-20T11:51:10Z 2021-03-20T18:26:41Z init: check setupterm() return value and error return value Hiltjo Posthuma hiltjo@codemadness.org commit 830e63da7d15879638f082e241ee489b895e7782 parent c94a5e5e01d617d1f1c2f08058df832148c4adc9 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 20 Mar 2021 12:51:10 +0100 init: check setupterm() return value and error return value POSIX specifies: "If setupterm() detects an error and errret is a null pointer, setupterm() writes a diagnostic message and exits." Specify errret and cleanup ourselves. minicurses will ignore this pointer, it will not use terminfo anyway. Initialize errret to 1 (success). Make sure to define and check against `OK` or `ERR` for portability, which is defined in POSIX. Reference: https://pubs.opengroup.org/onlinepubs/7908799/xcurses/del_curterm.html Discussed with quinq, thanks! c94a5e5e01d617d1f1c2f08058df832148c4adc9 2021-03-20T11:53:28Z 2021-03-20T18:26:34Z resettitle even if there was no succesful initialization setting `needcleanup` Hiltjo Posthuma hiltjo@codemadness.org commit c94a5e5e01d617d1f1c2f08058df832148c4adc9 parent e37cbef2ec362a29ea79ece4e88bd4a65e8c1145 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 20 Mar 2021 12:53:28 +0100 resettitle even if there was no succesful initialization setting `needcleanup` This makes sure to reset the terminal state and/or title when it calls die() inside init() or before. e37cbef2ec362a29ea79ece4e88bd4a65e8c1145 2021-03-20T11:25:48Z 2021-03-20T11:25:48Z code cleanup: don't call updategeom() in init() itself Hiltjo Posthuma hiltjo@codemadness.org commit e37cbef2ec362a29ea79ece4e88bd4a65e8c1145 parent ddf5df16b38ffae681dea75408146b51c0daeda0 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 20 Mar 2021 12:25:48 +0100 code cleanup: don't call updategeom() in init() itself ddf5df16b38ffae681dea75408146b51c0daeda0 2021-03-19T21:19:19Z 2021-03-19T21:19:19Z fix a memory leak when resizing the window Hiltjo Posthuma hiltjo@codemadness.org commit ddf5df16b38ffae681dea75408146b51c0daeda0 parent d59a1ec6aa2733c24906e37a0cf18170ceb14f5f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 19 Mar 2021 22:19:19 +0100 fix a memory leak when resizing the window This happened because setupterm() was called on each resize. ncurses internally then allocates a new structure every time on calling setupterm(). It also rereads the terminfo file and entries which is wasteful. Now it is setup once and only rereads the terminal dimensions using the ioctl directly. The global curses variables `columns` and `lines` are not used anymore. Note: the contents of the rows and columns are checked, because the ioctl can succeed, but return zero values, for example on serial consoles. d59a1ec6aa2733c24906e37a0cf18170ceb14f5f 2021-03-19T11:28:41Z 2021-03-19T19:02:08Z implement SGR mouse-encoding and improve mouse encoding in general Hiltjo Posthuma hiltjo@codemadness.org commit d59a1ec6aa2733c24906e37a0cf18170ceb14f5f parent abb3c25a40a627f2d337de1303ef9ab0a119f1d3 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Fri, 19 Mar 2021 12:28:41 +0100 implement SGR mouse-encoding and improve mouse encoding in general - Fix: Correctly encoding buttons 6 and 7. - Fix: a typo (substract -> subtract). - Feature: when the terminal emulator supports SGR mouse-encoding then it can encode x, y values beyond 224 columns and rows. This is useful for big screens. - Feature: map the side-buttons (back, forward) to switch panes. Useful in the monocle layout. - Feature: implement key masks (shift, meta, ctrl), unused though. abb3c25a40a627f2d337de1303ef9ab0a119f1d3 2021-03-16T17:55:21Z 2021-03-16T17:55:21Z fix the initial items scrollbar for the monocle layout... Hiltjo Posthuma hiltjo@codemadness.org commit abb3c25a40a627f2d337de1303ef9ab0a119f1d3 parent 05360826ef21c11ec81c9356784a923b0912ddd7 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 16 Mar 2021 18:55:21 +0100 fix the initial items scrollbar for the monocle layout... ... and add a comment why the width is checked for clarity. 05360826ef21c11ec81c9356784a923b0912ddd7 2021-03-16T17:42:54Z 2021-03-16T17:42:54Z code-style and rm some lines Hiltjo Posthuma hiltjo@codemadness.org commit 05360826ef21c11ec81c9356784a923b0912ddd7 parent 46da76767478ead6d1ebac3f5ab5c835f1840e9c Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 16 Mar 2021 18:42:54 +0100 code-style and rm some lines 46da76767478ead6d1ebac3f5ab5c835f1840e9c 2021-03-16T17:11:19Z 2021-03-16T17:12:35Z use dynamic (reusable) buffers for internal text buffering Hiltjo Posthuma hiltjo@codemadness.org commit 46da76767478ead6d1ebac3f5ab5c835f1840e9c parent 7d9d4d493a90bbd56bbe5cf175970a32ecb915bd Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 16 Mar 2021 18:11:19 +0100 use dynamic (reusable) buffers for internal text buffering - Fixes an issue when the sidebar would be > 256 columns long the text on the row would not be displayed. Especially noticable in the monocle and horizontal layout in fullscreen on bigger screens. - Fixes a silent truncation which would make searching on titles with > 1024 bytes not work. 7d9d4d493a90bbd56bbe5cf175970a32ecb915bd 2021-03-16T17:08:19Z 2021-03-16T17:12:35Z Improve resizing the sidebar Hiltjo Posthuma hiltjo@codemadness.org commit 7d9d4d493a90bbd56bbe5cf175970a32ecb915bd parent a9deda50bcc3a23a8876237cd72b69c62ac21db0 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 16 Mar 2021 18:08:19 +0100 Improve resizing the sidebar - Make sure the value of the actual set pane width / height using getsidebarsize and checking it in updatesidebar() is the same and not out of sync, which would unnecesarily call updategeom() and redraw unnecesary part. This would be reproducable in a rare case when the window height is 1 row and the feeds are toggled with 't'. - Separate calculating the optimal default size of the feedbar in a getsidebarsizedefault() function. - Clamp the minimal and maximum value when adjusting the sidebar size depending on the layout. This also fixes an issue in horizontal layout mode when the sidebar is 1 column high. It would require 2 keypresses (instead of 1) to increase the sidebar. - Only call updategeom() when it actually changed. a9deda50bcc3a23a8876237cd72b69c62ac21db0 2021-03-16T17:03:12Z 2021-03-16T17:12:35Z add a print utf-8 function that can directly print the data Hiltjo Posthuma hiltjo@codemadness.org commit a9deda50bcc3a23a8876237cd72b69c62ac21db0 parent a8843881faa9f53eaa614a162e8e3e89094f92c5 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 16 Mar 2021 18:03:12 +0100 add a print utf-8 function that can directly print the data This avoids unnecesary buffering and an empty line when the line is very long. a8843881faa9f53eaa614a162e8e3e89094f92c5 2021-03-16T17:02:23Z 2021-03-16T17:12:35Z sfeed_curses.1: document behaviour of opening a feed in the monocle layout Hiltjo Posthuma hiltjo@codemadness.org commit a8843881faa9f53eaa614a162e8e3e89094f92c5 parent f099ca0a6fabfcf4274c196ae5d25382fb9e12ab Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 16 Mar 2021 18:02:23 +0100 sfeed_curses.1: document behaviour of opening a feed in the monocle layout f099ca0a6fabfcf4274c196ae5d25382fb9e12ab 2021-03-16T17:01:23Z 2021-03-16T17:12:21Z add a comment to the included strcasestr() for portability Hiltjo Posthuma hiltjo@codemadness.org commit f099ca0a6fabfcf4274c196ae5d25382fb9e12ab parent f9354ef1a5b917bd26454efbe4e6d57a5aead514 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 16 Mar 2021 18:01:23 +0100 add a comment to the included strcasestr() for portability It is a non-standard (but very common available) GNU function. Add a comment this is added for portability sake though. f9354ef1a5b917bd26454efbe4e6d57a5aead514 2021-03-16T16:59:55Z 2021-03-16T16:59:55Z mark die() using the GNU compiler hint __dead Hiltjo Posthuma hiltjo@codemadness.org commit f9354ef1a5b917bd26454efbe4e6d57a5aead514 parent 65c4468cd60794b94a619f5f65e24297756c0260 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Tue, 16 Mar 2021 17:59:55 +0100 mark die() using the GNU compiler hint __dead Fixed a false-positive warning from clang-analyzer (scan-build). For portability just define it so it compiles when it's not known. 65c4468cd60794b94a619f5f65e24297756c0260 2021-03-13T12:22:41Z 2021-03-13T12:22:41Z bump version to 0.9.9 Hiltjo Posthuma hiltjo@codemadness.org commit 65c4468cd60794b94a619f5f65e24297756c0260 parent 3ddbb1bdc4330f2f67b840caca055746aa91db7f Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 13 Mar 2021 13:22:41 +0100 bump version to 0.9.9 3ddbb1bdc4330f2f67b840caca055746aa91db7f 2021-03-11T16:54:22Z 2021-03-11T16:54:22Z code-style: small white-space changes Hiltjo Posthuma hiltjo@codemadness.org commit 3ddbb1bdc4330f2f67b840caca055746aa91db7f parent f41bddbceff4853de58af9935d6340fc00145288 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 11 Mar 2021 17:54:22 +0100 code-style: small white-space changes f41bddbceff4853de58af9935d6340fc00145288 2021-03-10T18:24:25Z 2021-03-10T18:24:25Z allow to spawn the search prompt, even if there is nothing to search for Hiltjo Posthuma hiltjo@codemadness.org commit f41bddbceff4853de58af9935d6340fc00145288 parent 19d434197ca3879ac237136066a9c089d6e38524 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Mar 2021 19:24:25 +0100 allow to spawn the search prompt, even if there is nothing to search for ... and it will never find anything. 19d434197ca3879ac237136066a9c089d6e38524 2021-03-10T17:35:51Z 2021-03-10T17:35:51Z sfeed_curses.1: some rewording and lint fixes Hiltjo Posthuma hiltjo@codemadness.org commit 19d434197ca3879ac237136066a9c089d6e38524 parent 6af05c239894224413e88bc5d932134b65ab138e Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Mar 2021 18:35:51 +0100 sfeed_curses.1: some rewording and lint fixes 6af05c239894224413e88bc5d932134b65ab138e 2021-03-10T17:23:49Z 2021-03-10T17:23:49Z fix optimal size calculation in horizontal mode... Hiltjo Posthuma hiltjo@codemadness.org commit 6af05c239894224413e88bc5d932134b65ab138e parent 46695b179d5aa4893ab8f1a6943f280dafe6d98b Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Mar 2021 18:23:49 +0100 fix optimal size calculation in horizontal mode... .. and the amount of feeds are >= win.height / 2. Simplify the logic and make it a bit more consistent too. 46695b179d5aa4893ab8f1a6943f280dafe6d98b 2021-03-10T16:42:13Z 2021-03-10T16:09:04Z code-style: fix multi-line comment style Hiltjo Posthuma hiltjo@codemadness.org commit 46695b179d5aa4893ab8f1a6943f280dafe6d98b parent 83f15d40dff4c353efba704e7c51f05e077179d2 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Mar 2021 17:42:13 +0100 code-style: fix multi-line comment style 83f15d40dff4c353efba704e7c51f05e077179d2 2021-03-10T16:22:05Z 2021-03-10T16:09:04Z add horizontal and monocle layout and rework/cleanup drawing logic Hiltjo Posthuma hiltjo@codemadness.org commit 83f15d40dff4c353efba704e7c51f05e077179d2 parent 18bd36ede3a9d2ea2f8dbad50a3ce0858d272584 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Mar 2021 17:22:05 +0100 add horizontal and monocle layout and rework/cleanup drawing logic - Add the layouts horizontal and monocle. - The monocle layout replaces the mode of hiding the sidebar using 's'. This 's' keybind now toggles between a monocle and non-monocle layout (vertical or horizontal). When a feed is read from stdin (no filenames) then the default layout will now be monocle also. - The monocle layout also works nicely on smaller portable screens (such as a Motorola Droid4) or on smaller terminals or if a more newsboat-like style is wanted. - Layouts can be changed with the keybinds '1', '2', '3', a preference can also be set at startup using the recently added SFEED_AUTOCMD feature, like so: SFEED_AUTOCMD=2 sfeed_curses. 18bd36ede3a9d2ea2f8dbad50a3ce0858d272584 2021-03-10T16:18:50Z 2021-03-10T16:09:04Z simplify cyclepane logic Hiltjo Posthuma hiltjo@codemadness.org commit 18bd36ede3a9d2ea2f8dbad50a3ce0858d272584 parent d4b43904cf55ed616524e241ae5e4b191e1e22d5 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Mar 2021 17:18:50 +0100 simplify cyclepane logic The behaviour of switching panes if the sidebar is hidden is different now. It will be addressed in an upcoming commit implementing layouts. d4b43904cf55ed616524e241ae5e4b191e1e22d5 2021-03-10T16:15:45Z 2021-03-10T16:09:04Z code-style: shuffle global variables Hiltjo Posthuma hiltjo@codemadness.org commit d4b43904cf55ed616524e241ae5e4b191e1e22d5 parent d05e1dd6754f12dfe86e43545d26c7cdaccff3c9 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Mar 2021 17:15:45 +0100 code-style: shuffle global variables d05e1dd6754f12dfe86e43545d26c7cdaccff3c9 2021-03-10T16:07:52Z 2021-03-10T16:09:04Z add feature to process a sequence of keys automatically on startup Hiltjo Posthuma hiltjo@codemadness.org commit d05e1dd6754f12dfe86e43545d26c7cdaccff3c9 parent 07ba84aaade3283644269073f192aea576aa4fa2 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Mar 2021 17:07:52 +0100 add feature to process a sequence of keys automatically on startup This adds the environment variable $SFEED_AUTOCMD: Read and process a sequence of keys as input commands from this environment variable first, afterwards read from stdin as usual. This can be useful to automate certain actions at the start. 07ba84aaade3283644269073f192aea576aa4fa2 2021-03-06T11:37:28Z 2021-03-06T11:40:01Z sfeed_content: allow to use script on multiple TSV lines, separate by form feed (\f) Hiltjo Posthuma hiltjo@codemadness.org commit 07ba84aaade3283644269073f192aea576aa4fa2 parent 3693c4b6d682bb0b888db657dcfc8fb9309acfd9 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 6 Mar 2021 12:37:28 +0100 sfeed_content: allow to use script on multiple TSV lines, separate by form feed (\f) 3693c4b6d682bb0b888db657dcfc8fb9309acfd9 2021-03-06T10:14:18Z 2021-03-06T10:14:18Z sfeed_content: fix unescaping function Hiltjo Posthuma hiltjo@codemadness.org commit 3693c4b6d682bb0b888db657dcfc8fb9309acfd9 parent 015b434b8f0345665a9b6920f6dbbd361518904a Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 6 Mar 2021 11:14:18 +0100 sfeed_content: fix unescaping function A sequence with an escaped \ before another sequence will be incorrectly unescaped. To reproduce it: printf '\t\t\tcontent\\t\\\\n\nabc\tplain\n' | sfeed_content This also slightly improves performance by not using a regex. 015b434b8f0345665a9b6920f6dbbd361518904a 2021-02-20T19:05:58Z 2021-02-20T19:08:19Z mark as read: use the ID if the link is empty Hiltjo Posthuma hiltjo@codemadness.org commit 015b434b8f0345665a9b6920f6dbbd361518904a parent 95ef55218f09c78d2470581ec5640e5f05bca7b4 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sat, 20 Feb 2021 20:05:58 +0100 mark as read: use the ID if the link is empty This allows to mark only textual content (without a link) as read/unread. The link is optional as specified in the Atom RFC 4287. The ID is mandatory. * the id element conveys a permanent, universally unique identifier for an entry or feed. * atom:feed elements MUST contain exactly one atom:id element. * atom:feed elements SHOULD contain one atom:link element. Document the "mark as read" behaviour in a bit more detail too. Suggested by feedback from Hadrien Lacour, thanks! 95ef55218f09c78d2470581ec5640e5f05bca7b4 2021-02-14T17:00:52Z 2021-02-14T17:00:52Z updategeom: small refactoring Hiltjo Posthuma hiltjo@codemadness.org commit 95ef55218f09c78d2470581ec5640e5f05bca7b4 parent a210870a4f574df86886f2891e98b3ad12b257af Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Sun, 14 Feb 2021 18:00:52 +0100 updategeom: small refactoring a210870a4f574df86886f2891e98b3ad12b257af 2021-02-10T16:38:06Z 2021-02-10T16:43:06Z pane_row_draw: check if the pane is visible or drawable Hiltjo Posthuma hiltjo@codemadness.org commit a210870a4f574df86886f2891e98b3ad12b257af parent a16ef52f5f57272607cec7dbaa409f1debc1d929 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Feb 2021 17:38:06 +0100 pane_row_draw: check if the pane is visible or drawable pane_row_draw() is also called in pane_setpos(), but this should then not draw. No functional change intended in the current program though. a16ef52f5f57272607cec7dbaa409f1debc1d929 2021-02-10T16:35:53Z 2021-02-10T16:43:05Z improve dirty flag handling when pane is hidden Hiltjo Posthuma hiltjo@codemadness.org commit a16ef52f5f57272607cec7dbaa409f1debc1d929 parent 3b35fd201979327c13edffcb7f472cadd635bbb5 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Feb 2021 17:35:53 +0100 improve dirty flag handling when pane is hidden This always resets the dirty flag even when the pane is currently hidden. Do not draw when either the width or height is zero anyway. Document the height should be > 0, otherwise there could be a divide (or modulo) by zero in certain functions (like drawing, scrolling). No functional change intended in the current program logic, but this makes logically more sense. 3b35fd201979327c13edffcb7f472cadd635bbb5 2021-02-10T16:35:00Z 2021-02-10T16:35:00Z fix tiny glitch when the feed pane is exactly the same size as the window Hiltjo Posthuma hiltjo@codemadness.org commit 3b35fd201979327c13edffcb7f472cadd635bbb5 parent e0bb2c9936288bb9cc1cb09c1b98bd6e3beb5729 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Wed, 10 Feb 2021 17:35:00 +0100 fix tiny glitch when the feed pane is exactly the same size as the window e0bb2c9936288bb9cc1cb09c1b98bd6e3beb5729 2021-02-01T13:49:07Z 2021-02-01T13:49:07Z mousereport: do not bubble events Hiltjo Posthuma hiltjo@codemadness.org commit e0bb2c9936288bb9cc1cb09c1b98bd6e3beb5729 parent 774fbf2d627f98e1c00bf7c0080e9586bc8e6bd0 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 1 Feb 2021 14:49:07 +0100 mousereport: do not bubble events No intended behaviour change. Windows are currently not overlapping, but make the logic more hackable for custom window layouts. 774fbf2d627f98e1c00bf7c0080e9586bc8e6bd0 2021-02-01T13:48:32Z 2021-02-01T13:48:32Z updategeom: statusbar.y: make it a bit more logical/hackable Hiltjo Posthuma hiltjo@codemadness.org commit 774fbf2d627f98e1c00bf7c0080e9586bc8e6bd0 parent 464e01040330413f03c8dc575aa5ad1721cb361c Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Mon, 1 Feb 2021 14:48:32 +0100 updategeom: statusbar.y: make it a bit more logical/hackable No intended behaviour change.