sfeed_curses, branch HEADsfeed curses UI (now part of sfeed, development is in sfeed)
af3c9ada0369b9a62414df5d5d99b972ab7a8fcb2023-02-26T13:48:58Z2023-02-26T13:48:58Zsfeed_curses is now part of sfeedHiltjo Posthumahiltjo@codemadness.orgcommit 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
8e151ce48b503ad0ff0e24cb1be3bc93d6fbd8952021-10-25T20:59:20Z2021-10-25T21:07:45Zsfeed_content: optimizationsHiltjo Posthumahiltjo@codemadness.orgcommit 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.
7bf22e2b26d6e81c28404cc0230b7a0b6dee54c32021-10-24T18:59:50Z2021-10-25T21:07:11Zsfeed_content: add link as base URL for HTML contentHiltjo Posthumahiltjo@codemadness.orgcommit 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.
cdc9b56cff13200d3f6abe4401a308c38a99a70c2021-10-02T09:37:53Z2021-10-02T09:37:53Zsfeed_curses.1: shuffle [ and ] documentationHiltjo Posthumahiltjo@codemadness.orgcommit 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.
03908db38236f1f8a565aa883dc3b0e714270f6d2021-09-12T14:43:39Z2021-09-12T14:43:39Zsfeed_curses.1: fix a small typo in the man pageHiltjo Posthumahiltjo@codemadness.orgcommit 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!
7e4b1bb5850bd99213d82b758117294aa5abae2d2021-08-06T16:34:49Z2021-08-06T17:58:31Zbump version to 1.0Hiltjo Posthumahiltjo@codemadness.orgcommit 7e4b1bb5850bd99213d82b758117294aa5abae2d
parent b30727b888d7a088baca8afbc0470313d9bb4a20
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 6 Aug 2021 18:34:49 +0200
bump version to 1.0
b30727b888d7a088baca8afbc0470313d9bb4a202021-08-06T17:58:08Z2021-08-06T17:58:31Zimprove some wordingHiltjo Posthumahiltjo@codemadness.orgcommit b30727b888d7a088baca8afbc0470313d9bb4a20
parent aadc489e0add931d4a1ae07f3faf699e1ec2cf5b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 6 Aug 2021 19:58:08 +0200
improve some wording
aadc489e0add931d4a1ae07f3faf699e1ec2cf5b2021-08-06T16:21:03Z2021-08-06T16:26:28Zadd another example to the man page showing some featuresHiltjo Posthumahiltjo@codemadness.orgcommit 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
938ec955883fe31ca92c3eb8b3217e246d07ceaa2021-08-06T15:57:22Z2021-08-06T15:57:22Zfix another 2 grammar mistakesHiltjo Posthumahiltjo@codemadness.orgcommit 938ec955883fe31ca92c3eb8b3217e246d07ceaa
parent fb4816aa2e60ead6749867ce3c729686d3d3cde2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 6 Aug 2021 17:57:22 +0200
fix another 2 grammar mistakes
fb4816aa2e60ead6749867ce3c729686d3d3cde22021-08-03T17:10:41Z2021-08-03T17:10:41Zman page improvementsHiltjo Posthumahiltjo@codemadness.orgcommit fb4816aa2e60ead6749867ce3c729686d3d3cde2
parent 4319fae1c096263c17bab392a66914ab0551018a
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 3 Aug 2021 19:10:41 +0200
man page improvements
4319fae1c096263c17bab392a66914ab0551018a2021-07-25T12:51:57Z2021-07-25T12:52:45Zminicurses.h: fix parameter type for tparm()Hiltjo Posthumahiltjo@codemadness.orgcommit 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).
ea54b7b64b9a9c92108a2e1c680c426ca248e9cd2021-07-25T12:36:53Z2021-07-25T12:52:41Zcheck if capname is NULL for tparm()Hiltjo Posthumahiltjo@codemadness.orgcommit 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 .
8ebfb75d9ca26ce24a76aa3dc956182bd06f5b592021-07-25T12:00:43Z2021-07-25T12:47:09Zfix a false-positive warnings with gcc 10.2+ and -Wall -O2Hiltjo Posthumahiltjo@codemadness.orgcommit 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
40bfd7846f72a063eede961e578f0ae667727b3f2021-07-25T09:47:55Z2021-07-25T09:52:56Zminor change: in usage change "parameter" to "argument"Hiltjo Posthumahiltjo@codemadness.orgcommit 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"
9d3e0853cfb0d0b3c2b53838377e7b0b04fd1e7f2021-07-24T21:13:53Z2021-07-25T09:52:56Zsfeed_markread: use "-" instead of /dev/stdinHiltjo Posthumahiltjo@codemadness.orgcommit 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".
a3c02678f80ec8c253ce680d36ae9bd4ee935d8c2021-07-24T20:56:59Z2021-07-25T09:52:53Zman page improvementsHiltjo Posthumahiltjo@codemadness.orgcommit a3c02678f80ec8c253ce680d36ae9bd4ee935d8c
parent fc93b4fee3ca1aa3430458e848d2f37ff010074d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 24 Jul 2021 22:56:59 +0200
man page improvements
fc93b4fee3ca1aa3430458e848d2f37ff010074d2021-07-24T20:52:41Z2021-07-24T20:52:41Zsfeed_markread: simplify, always print all usage instructionsHiltjo Posthumahiltjo@codemadness.orgcommit 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
e2a3071bb2729a3bc87db2322e351bc60fb4d9ff2021-07-24T20:39:57Z2021-07-24T20:39:57Zsfeed_markread: allow to set the url as a parameter or as an env variableHiltjo Posthumahiltjo@codemadness.orgcommit 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
84529dc8f6cdca8c83c7cb22e1c7d09aa2a0cbf62021-07-24T20:38:55Z2021-07-24T20:38:55Zsfeed_markread: for the unread comment: create the file if it does not existHiltjo Posthumahiltjo@codemadness.orgcommit 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.
82e0cbb1afd2fff9654d1f0decff9215379320382021-07-24T20:37:58Z2021-07-24T20:37:58Zsfeed_content: allow multiple file parameters as argumentsHiltjo Posthumahiltjo@codemadness.orgcommit 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.
976c3d377d2c97129d7cf3477fcdcb02efa48e692021-07-24T20:37:16Z2021-07-24T20:37:16Zsimplify header comment in scriptsHiltjo Posthumahiltjo@codemadness.orgcommit 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.
d4d23f32309713d4204f72845ee45b6a67256aaf2021-07-24T20:35:23Z2021-07-24T20:35:23Zsfeed_markread: make sure to use proper permissionsHiltjo Posthumahiltjo@codemadness.orgcommit 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.
ef0d1174e6339b3ce0a9b5ea16f392369a10b2202021-07-22T14:54:14Z2021-07-22T14:54:14Zsfeed_curses.1: add usage exampleHiltjo Posthumahiltjo@codemadness.orgcommit ef0d1174e6339b3ce0a9b5ea16f392369a10b220
parent 9f09a2ef6080f7b168af4c4b52dc092aa022fd02
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 22 Jul 2021 16:54:14 +0200
sfeed_curses.1: add usage example
9f09a2ef6080f7b168af4c4b52dc092aa022fd022021-07-16T10:28:17Z2021-07-16T10:43:23Zsfeed_markread.1: some rewording and clarify it writes to SFEED_URL_FILEHiltjo Posthumahiltjo@codemadness.orgcommit 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
0ebfe4a085072376ad9604b8442f895569881a8a2021-07-14T16:06:33Z2021-07-14T16:06:33Zcode-style and consistency: remove unneeded returnHiltjo Posthumahiltjo@codemadness.orgcommit 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).
c01bf03a25c90f8bb623f60ec6fa7c961997debb2021-07-14T15:58:29Z2021-07-14T15:58:29Zurls_read: exit early if there is a read errorHiltjo Posthumahiltjo@codemadness.orgcommit 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
b4c423045934c3a9562091b8cf2d5db888d3a1362021-07-14T15:57:38Z2021-07-14T15:57:38Zitem_row_get: exit early if there is a read errorHiltjo Posthumahiltjo@codemadness.orgcommit 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.
59bea5033b7176b6ae9554670bdd02cb76009fae2021-07-14T15:57:20Z2021-07-14T15:57:20Zfeed_count: exit early if there is a read errorHiltjo Posthumahiltjo@codemadness.orgcommit 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
74959a9fbbc0599ca3c1b43d435fd57f6af2b1ef2021-07-14T15:56:30Z2021-07-14T15:56:30Zfeed_items_get: simplify and exit earlierHiltjo Posthumahiltjo@codemadness.orgcommit 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.
768a524cd3bbfe7c225b08e539a6ba35f9464ecb2021-07-14T15:53:51Z2021-07-14T15:53:51Zurls_read: exit early if opening the file with URLs failsHiltjo Posthumahiltjo@codemadness.orgcommit 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.
827f4afdcecbb6cb53ee60d52d068ce5f94bbaac2021-07-10T17:14:48Z2021-07-10T17:14:48Zimprove consistency of line counting (on an invalid file)Hiltjo Posthumahiltjo@codemadness.orgcommit 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.
1d4e2e3f6913318cdfce03f08bb517a8c8ebbc562021-07-10T16:39:48Z2021-07-10T16:39:48Zbump version to 0.9.13Hiltjo Posthumahiltjo@codemadness.orgcommit 1d4e2e3f6913318cdfce03f08bb517a8c8ebbc56
parent 8d1ba2bee49f27f6d8d8273d075924b0f76b8496
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 10 Jul 2021 18:39:48 +0200
bump version to 0.9.13
8d1ba2bee49f27f6d8d8273d075924b0f76b84962021-07-07T16:14:40Z2021-07-07T16:14:40Zfix typo: url -> URLHiltjo Posthumahiltjo@codemadness.orgcommit 8d1ba2bee49f27f6d8d8273d075924b0f76b8496
parent b624558593a0d366e17c083a7a238203d5a52472
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 7 Jul 2021 18:14:40 +0200
fix typo: url -> URL
b624558593a0d366e17c083a7a238203d5a524722021-06-05T13:41:17Z2021-06-05T13:41:17ZMakefile: switch to use CPPFLAGS -D_DEFAULT_SOURCEHiltjo Posthumahiltjo@codemadness.orgcommit 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.
c665475737051568791b0c1f9c198e69aa94c6442021-06-03T15:02:29Z2021-06-03T15:02:29Zbump version to 0.9.12Hiltjo Posthumahiltjo@codemadness.orgcommit c665475737051568791b0c1f9c198e69aa94c644
parent 7b644e71a5a08ba26bd420605310cdda33dac95f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 3 Jun 2021 17:02:29 +0200
bump version to 0.9.12
7b644e71a5a08ba26bd420605310cdda33dac95f2021-05-30T10:30:18Z2021-05-30T10:30:18Zmono_highlight: show items as bold when selected.Hiltjo Posthumahiltjo@codemadness.orgcommit 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.
434cd340170d74620aaaa1bc56e681d59cb568642021-05-30T10:01:05Z2021-05-30T10:01:05Ztheme: add a version of the mono theme which highlights the active panelHiltjo Posthumahiltjo@codemadness.orgcommit 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
215e57201ba7b6354cda15ed0904570b1b9277b42021-05-30T09:59:33Z2021-05-30T09:59:33Zadd [ and ] keybind to open the next visible feed in the paneHiltjo Posthumahiltjo@codemadness.orgcommit 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!
f649473b5f2146a7bcaa598f6314c2d44d8e3c4a2021-04-29T16:06:34Z2021-04-29T16:06:34Zbump version to 0.9.11Hiltjo Posthumahiltjo@codemadness.orgcommit f649473b5f2146a7bcaa598f6314c2d44d8e3c4a
parent bed53f9cf8124b7fe556ac809e6479c017abfbbc
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 29 Apr 2021 18:06:34 +0200
bump version to 0.9.11
bed53f9cf8124b7fe556ac809e6479c017abfbbc2021-04-21T15:02:38Z2021-04-21T15:03:56Zsfeed_content: show any other content-type than "html" as plain-textHiltjo Posthumahiltjo@codemadness.orgcommit 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
85d1802fa73cb7311c6c2a4c917fcd16f647fbed2021-04-19T22:22:47Z2021-04-20T17:55:29Zsfeed_content: content view optimizationHiltjo Posthumahiltjo@codemadness.orgcommit 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).
61c48746013c47d77b47c0b7606882983b185b6d2021-04-07T18:29:28Z2021-04-07T18:29:28Zfix 2 false-positive warnings with gcc 10.2+ and -Wall -O2Hiltjo Posthumahiltjo@codemadness.orgcommit 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.
f0a76e0f90e04147b1199a9187c97c4727d240c42021-03-31T18:14:04Z2021-03-31T18:14:04Zbump version to 0.9.10Hiltjo Posthumahiltjo@codemadness.orgcommit f0a76e0f90e04147b1199a9187c97c4727d240c4
parent 551304948865eed4fe8402746a11f8b62757fdcc
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 31 Mar 2021 20:14:04 +0200
bump version to 0.9.10
551304948865eed4fe8402746a11f8b62757fdcc2021-03-31T16:17:28Z2021-03-31T16:30:18Zwhen the pane items or scrollbar are outside the window do not draw themHiltjo Posthumahiltjo@codemadness.orgcommit 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.
9c7de6a70d87fd2c7a73e68bf73e13d6ac1032432021-03-31T16:16:44Z2021-03-31T16:30:18Zupdategeom: just place the statusbar absolute on the bottom of the windowHiltjo Posthumahiltjo@codemadness.orgcommit 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.
8434b8a25e88b432533280dc138369b65410ef9c2021-03-31T16:15:07Z2021-03-31T16:29:27Zdo not clearscreen when the window is dirtyHiltjo Posthumahiltjo@codemadness.orgcommit 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.
260ffbb1e60b8d2600b3467c98e7ec24a6e0f9a22021-03-31T16:14:12Z2021-03-31T16:19:14Zupdategeom: small code-style, similar to vertical layoutHiltjo Posthumahiltjo@codemadness.orgcommit 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
e8baa8ef0f426922b49a941a18fa26f7b6bcc37e2021-03-31T16:13:01Z2021-03-31T16:18:43Zdo not draw a row, scrollbar or statusbar if its completely outside the windowHiltjo Posthumahiltjo@codemadness.orgcommit 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.
3bc8fcc8b261f1b73d8b24d7a3f5cd8e2654ab782021-03-30T16:04:58Z2021-03-30T16:04:58Zimprove a few code commentsHiltjo Posthumahiltjo@codemadness.orgcommit 3bc8fcc8b261f1b73d8b24d7a3f5cd8e2654ab78
parent 0ca6c8a990047b290fec8fb201a18253fda4bde7
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 30 Mar 2021 18:04:58 +0200
improve a few code comments
0ca6c8a990047b290fec8fb201a18253fda4bde72021-03-29T18:07:10Z2021-03-29T18:31:32Zmake a feeds_row_get function to find the positionHiltjo Posthumahiltjo@codemadness.orgcommit 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
65f7223309e929522ca4e3762604f10653db5aca2021-03-29T18:00:36Z2021-03-29T18:31:32Zmake plumb, pipe, yank a function and reuse them for keybinds and mouse actionsHiltjo Posthumahiltjo@codemadness.orgcommit 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
edcbb556469e5381e61f0d733b95b472d55ecf442021-03-29T18:00:08Z2021-03-29T18:31:32Zcheck row for NULL in feed_open_selectedHiltjo Posthumahiltjo@codemadness.orgcommit 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.
c5c1f1c85a2a0fe44eab2786255dab73a2ca448a2021-03-29T17:58:53Z2021-03-29T18:31:32Zremove unneeded casts for row->dataHiltjo Posthumahiltjo@codemadness.orgcommit c5c1f1c85a2a0fe44eab2786255dab73a2ca448a
parent 0cd539155ae12983a7ff1febd14b8c56774a85e7
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 29 Mar 2021 19:58:53 +0200
remove unneeded casts for row->data
0cd539155ae12983a7ff1febd14b8c56774a85e72021-03-29T17:56:16Z2021-03-29T18:31:32Zafter toggling showing new feeds or when reloading feeds try to select the same feedHiltjo Posthumahiltjo@codemadness.orgcommit 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.
47e37f53d05797b18d2c6d2567187c28ac3f23ab2021-03-29T17:31:13Z2021-03-29T17:34:07Zclamp height value in getsidebarsizedefault()Hiltjo Posthumahiltjo@codemadness.orgcommit 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.
542d8132811f4c139b40613a331ad049ccffb0d72021-03-26T17:22:51Z2021-03-26T17:22:51Zmarkread: use a range-check for p->pos for one item, just in caseHiltjo Posthumahiltjo@codemadness.orgcommit 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
aedcc4d12d8a10a0411e82f8e002e3c08401b1bd2021-03-26T17:22:00Z2021-03-26T17:22:00Zfix a comment, which was meant to be the oppositeHiltjo Posthumahiltjo@codemadness.orgcommit 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
6638160adb2c006ba386036173dc50dc63571e692021-03-26T17:20:25Z2021-03-26T17:20:25Zright-click plumb: use interactive flagHiltjo Posthumahiltjo@codemadness.orgcommit 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.
26db62828804cef0fe6cc1db2afae6414311321e2021-03-25T21:42:00Z2021-03-25T21:56:32Zadd keybinds to go one item up or down and open itHiltjo Posthumahiltjo@codemadness.orgcommit 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."
263fecaf915f6ae1ea2b2fea1f599502c9500b202021-03-25T21:38:21Z2021-03-25T21:38:21Zmake a function for the common code for opening/plumbing a feed or itemHiltjo Posthumahiltjo@codemadness.orgcommit 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.
031a577c39cdd4fcf518569d2ca7e869e646313f2021-03-24T22:07:07Z2021-03-25T00:48:15Zalso allow scrolling when the position is exactly on the pane its scrollbarHiltjo Posthumahiltjo@codemadness.orgcommit 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
357de99788bf6760165d1934d4dc4838c18f15832021-03-24T21:45:19Z2021-03-24T21:45:52Zfix scroll handling regression and remove ctrl+scroll feature to adjust sidebarHiltjo Posthumahiltjo@codemadness.orgcommit 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
39fe4803fb3595e9425efae568c2e9a53f143a4c2021-03-24T17:15:14Z2021-03-24T17:17:10Zfix mouse actions that don't depend on a position in a paneHiltjo Posthumahiltjo@codemadness.orgcommit 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.
64f10e20f6dce1cdf6ee517ab9ce12b39a192d5f2021-03-24T17:14:50Z2021-03-24T17:17:10Zmouse: rename mask to keymaskHiltjo Posthumahiltjo@codemadness.orgcommit 64f10e20f6dce1cdf6ee517ab9ce12b39a192d5f
parent 5cfd4db8738430c39c711d117809f48635ec1578
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 24 Mar 2021 18:14:50 +0100
mouse: rename mask to keymask
5cfd4db8738430c39c711d117809f48635ec15782021-03-24T17:14:02Z2021-03-24T17:17:07Zimprove init() and cleanup() of terminalHiltjo Posthumahiltjo@codemadness.orgcommit 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.
0ead415f22016b33698476e9b7212ad51d63eb982021-03-24T17:08:59Z2021-03-24T17:08:59Zsfeed_curses.1: mention the specific encodings X10 and SGRHiltjo Posthumahiltjo@codemadness.orgcommit 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.
cb62fb68ea42d7ca3f52fee947077a0f35d8000a2021-03-21T00:46:03Z2021-03-21T00:46:03Zfix resizewin for serial consolesHiltjo Posthumahiltjo@codemadness.orgcommit 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.
65449180719dd2c4d27f7370695b9e4eee9e5b722021-03-21T00:45:24Z2021-03-21T00:45:24Zminicurses: remove now unused codeHiltjo Posthumahiltjo@codemadness.orgcommit 65449180719dd2c4d27f7370695b9e4eee9e5b72
parent 830e63da7d15879638f082e241ee489b895e7782
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 21 Mar 2021 01:45:24 +0100
minicurses: remove now unused code
830e63da7d15879638f082e241ee489b895e77822021-03-20T11:51:10Z2021-03-20T18:26:41Zinit: check setupterm() return value and error return valueHiltjo Posthumahiltjo@codemadness.orgcommit 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!
c94a5e5e01d617d1f1c2f08058df832148c4adc92021-03-20T11:53:28Z2021-03-20T18:26:34Zresettitle even if there was no succesful initialization setting `needcleanup`Hiltjo Posthumahiltjo@codemadness.orgcommit 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.
e37cbef2ec362a29ea79ece4e88bd4a65e8c11452021-03-20T11:25:48Z2021-03-20T11:25:48Zcode cleanup: don't call updategeom() in init() itselfHiltjo Posthumahiltjo@codemadness.orgcommit 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
ddf5df16b38ffae681dea75408146b51c0daeda02021-03-19T21:19:19Z2021-03-19T21:19:19Zfix a memory leak when resizing the windowHiltjo Posthumahiltjo@codemadness.orgcommit 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.
d59a1ec6aa2733c24906e37a0cf18170ceb14f5f2021-03-19T11:28:41Z2021-03-19T19:02:08Zimplement SGR mouse-encoding and improve mouse encoding in generalHiltjo Posthumahiltjo@codemadness.orgcommit 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.
abb3c25a40a627f2d337de1303ef9ab0a119f1d32021-03-16T17:55:21Z2021-03-16T17:55:21Zfix the initial items scrollbar for the monocle layout...Hiltjo Posthumahiltjo@codemadness.orgcommit 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.
05360826ef21c11ec81c9356784a923b0912ddd72021-03-16T17:42:54Z2021-03-16T17:42:54Zcode-style and rm some linesHiltjo Posthumahiltjo@codemadness.orgcommit 05360826ef21c11ec81c9356784a923b0912ddd7
parent 46da76767478ead6d1ebac3f5ab5c835f1840e9c
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 16 Mar 2021 18:42:54 +0100
code-style and rm some lines
46da76767478ead6d1ebac3f5ab5c835f1840e9c2021-03-16T17:11:19Z2021-03-16T17:12:35Zuse dynamic (reusable) buffers for internal text bufferingHiltjo Posthumahiltjo@codemadness.orgcommit 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.
7d9d4d493a90bbd56bbe5cf175970a32ecb915bd2021-03-16T17:08:19Z2021-03-16T17:12:35ZImprove resizing the sidebarHiltjo Posthumahiltjo@codemadness.orgcommit 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.
a9deda50bcc3a23a8876237cd72b69c62ac21db02021-03-16T17:03:12Z2021-03-16T17:12:35Zadd a print utf-8 function that can directly print the dataHiltjo Posthumahiltjo@codemadness.orgcommit 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.
a8843881faa9f53eaa614a162e8e3e89094f92c52021-03-16T17:02:23Z2021-03-16T17:12:35Zsfeed_curses.1: document behaviour of opening a feed in the monocle layoutHiltjo Posthumahiltjo@codemadness.orgcommit 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
f099ca0a6fabfcf4274c196ae5d25382fb9e12ab2021-03-16T17:01:23Z2021-03-16T17:12:21Zadd a comment to the included strcasestr() for portabilityHiltjo Posthumahiltjo@codemadness.orgcommit 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.
f9354ef1a5b917bd26454efbe4e6d57a5aead5142021-03-16T16:59:55Z2021-03-16T16:59:55Zmark die() using the GNU compiler hint __deadHiltjo Posthumahiltjo@codemadness.orgcommit 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.
65c4468cd60794b94a619f5f65e24297756c02602021-03-13T12:22:41Z2021-03-13T12:22:41Zbump version to 0.9.9Hiltjo Posthumahiltjo@codemadness.orgcommit 65c4468cd60794b94a619f5f65e24297756c0260
parent 3ddbb1bdc4330f2f67b840caca055746aa91db7f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 13 Mar 2021 13:22:41 +0100
bump version to 0.9.9
3ddbb1bdc4330f2f67b840caca055746aa91db7f2021-03-11T16:54:22Z2021-03-11T16:54:22Zcode-style: small white-space changesHiltjo Posthumahiltjo@codemadness.orgcommit 3ddbb1bdc4330f2f67b840caca055746aa91db7f
parent f41bddbceff4853de58af9935d6340fc00145288
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 11 Mar 2021 17:54:22 +0100
code-style: small white-space changes
f41bddbceff4853de58af9935d6340fc001452882021-03-10T18:24:25Z2021-03-10T18:24:25Zallow to spawn the search prompt, even if there is nothing to search forHiltjo Posthumahiltjo@codemadness.orgcommit 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.
19d434197ca3879ac237136066a9c089d6e385242021-03-10T17:35:51Z2021-03-10T17:35:51Zsfeed_curses.1: some rewording and lint fixesHiltjo Posthumahiltjo@codemadness.orgcommit 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
6af05c239894224413e88bc5d932134b65ab138e2021-03-10T17:23:49Z2021-03-10T17:23:49Zfix optimal size calculation in horizontal mode...Hiltjo Posthumahiltjo@codemadness.orgcommit 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.
46695b179d5aa4893ab8f1a6943f280dafe6d98b2021-03-10T16:42:13Z2021-03-10T16:09:04Zcode-style: fix multi-line comment styleHiltjo Posthumahiltjo@codemadness.orgcommit 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
83f15d40dff4c353efba704e7c51f05e077179d22021-03-10T16:22:05Z2021-03-10T16:09:04Zadd horizontal and monocle layout and rework/cleanup drawing logicHiltjo Posthumahiltjo@codemadness.orgcommit 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.
18bd36ede3a9d2ea2f8dbad50a3ce0858d2725842021-03-10T16:18:50Z2021-03-10T16:09:04Zsimplify cyclepane logicHiltjo Posthumahiltjo@codemadness.orgcommit 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.
d4b43904cf55ed616524e241ae5e4b191e1e22d52021-03-10T16:15:45Z2021-03-10T16:09:04Zcode-style: shuffle global variablesHiltjo Posthumahiltjo@codemadness.orgcommit d4b43904cf55ed616524e241ae5e4b191e1e22d5
parent d05e1dd6754f12dfe86e43545d26c7cdaccff3c9
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 10 Mar 2021 17:15:45 +0100
code-style: shuffle global variables
d05e1dd6754f12dfe86e43545d26c7cdaccff3c92021-03-10T16:07:52Z2021-03-10T16:09:04Zadd feature to process a sequence of keys automatically on startupHiltjo Posthumahiltjo@codemadness.orgcommit 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.
07ba84aaade3283644269073f192aea576aa4fa22021-03-06T11:37:28Z2021-03-06T11:40:01Zsfeed_content: allow to use script on multiple TSV lines, separate by form feed (\f)Hiltjo Posthumahiltjo@codemadness.orgcommit 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)
3693c4b6d682bb0b888db657dcfc8fb9309acfd92021-03-06T10:14:18Z2021-03-06T10:14:18Zsfeed_content: fix unescaping functionHiltjo Posthumahiltjo@codemadness.orgcommit 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.
015b434b8f0345665a9b6920f6dbbd361518904a2021-02-20T19:05:58Z2021-02-20T19:08:19Zmark as read: use the ID if the link is emptyHiltjo Posthumahiltjo@codemadness.orgcommit 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!
95ef55218f09c78d2470581ec5640e5f05bca7b42021-02-14T17:00:52Z2021-02-14T17:00:52Zupdategeom: small refactoringHiltjo Posthumahiltjo@codemadness.orgcommit 95ef55218f09c78d2470581ec5640e5f05bca7b4
parent a210870a4f574df86886f2891e98b3ad12b257af
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 14 Feb 2021 18:00:52 +0100
updategeom: small refactoring
a210870a4f574df86886f2891e98b3ad12b257af2021-02-10T16:38:06Z2021-02-10T16:43:06Zpane_row_draw: check if the pane is visible or drawableHiltjo Posthumahiltjo@codemadness.orgcommit 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.
a16ef52f5f57272607cec7dbaa409f1debc1d9292021-02-10T16:35:53Z2021-02-10T16:43:05Zimprove dirty flag handling when pane is hiddenHiltjo Posthumahiltjo@codemadness.orgcommit 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.
3b35fd201979327c13edffcb7f472cadd635bbb52021-02-10T16:35:00Z2021-02-10T16:35:00Zfix tiny glitch when the feed pane is exactly the same size as the windowHiltjo Posthumahiltjo@codemadness.orgcommit 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
e0bb2c9936288bb9cc1cb09c1b98bd6e3beb57292021-02-01T13:49:07Z2021-02-01T13:49:07Zmousereport: do not bubble eventsHiltjo Posthumahiltjo@codemadness.orgcommit 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.
774fbf2d627f98e1c00bf7c0080e9586bc8e6bd02021-02-01T13:48:32Z2021-02-01T13:48:32Zupdategeom: statusbar.y: make it a bit more logical/hackableHiltjo Posthumahiltjo@codemadness.orgcommit 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.