canto-curses.git
2 years agoImplement taglist.spacing master
Jack Miller [Thu, 3 Aug 2017 05:37:29 +0000 (00:37 -0500)]
Implement taglist.spacing

2 years agoImplement taglist.wrap
Jack Miller [Thu, 3 Aug 2017 04:26:32 +0000 (23:26 -0500)]
Implement taglist.wrap

2 years ago0.9.9 v0.9.9
Jack Miller [Wed, 28 Jun 2017 22:01:11 +0000 (17:01 -0500)]
0.9.9

2 years agoFix losing symbolic keys after resize (no input)
Jack Miller [Wed, 28 Jun 2017 21:59:10 +0000 (16:59 -0500)]
Fix losing symbolic keys after resize (no input)

self.input_box almost always exists, so the previous patch didn't do
what I thought it did. Instead, use a proper flag. Try to do better with
resizes while in readline too.

2 years ago0.9.8 v0.9.8
Jack Miller [Wed, 28 Jun 2017 06:30:26 +0000 (01:30 -0500)]
0.9.8

2 years agoFix resize making cursor invisible / keys not work in readline
Jack Miller [Wed, 28 Jun 2017 06:15:10 +0000 (01:15 -0500)]
Fix resize making cursor invisible / keys not work in readline

Maintain curs_set and keypad settings.

2 years agoFix input_box refresh() out of order resize
Jack Miller [Wed, 28 Jun 2017 05:29:21 +0000 (00:29 -0500)]
Fix input_box refresh() out of order resize

Because readline is in charge of calling redisplay, and appears to call
redisplay on resize, and redisplay call input_box.refresh, which is
racing with potentially initing a new input_box, so if the input box's
init() hasn't been called yet, don't do anything.

Fixes exceptions when resizing frequently with a prompt open.

2 years agoRemove unused content variable
Jack Miller [Wed, 28 Jun 2017 05:24:21 +0000 (00:24 -0500)]
Remove unused content variable

2 years agoFix invisible cursor in input box
Jack Miller [Wed, 28 Jun 2017 03:48:39 +0000 (22:48 -0500)]
Fix invisible cursor in input box

2 years agoFix item list / make int_range more permissive
Jack Miller [Wed, 28 Jun 2017 03:07:31 +0000 (22:07 -0500)]
Fix item list / make int_range more permissive

Ugh, this code was tangled. Fix a braindead conditional sequence, drop
the first_sel fallback. Make sure all items refers to all visible items,
as TagList assumes, so skip collapsed tags when setting up domains.

Also, shutup about failing the check when item-list returns empty. It's
harmless and now it can occur when we don't have a fallback.

Closes #45

3 years agoint_range, only fallback if given nothing
Jack Miller [Tue, 13 Sep 2016 22:18:39 +0000 (17:18 -0500)]
int_range, only fallback if given nothing

This keeps us from stupidly falling back to default args (usu.
selection) if the user gives bad arguments. Only fallback on defaults if
the context is supposed to be implied.

i.e. ':del' with a selection deletes that feed
     ':del adsada' with a selection properly errors out

Closes #42

3 years agoAllow tag-list items to be maintag names
Jack Miller [Tue, 13 Sep 2016 22:11:04 +0000 (17:11 -0500)]
Allow tag-list items to be maintag names

This makes commands like :del/:promote/:demote Reddit actually work,
instead of requiring a numeric index.

3 years agoRemove totally implicit tag list arg
Jack Miller [Tue, 13 Sep 2016 21:53:11 +0000 (16:53 -0500)]
Remove totally implicit tag list arg

This removes the case where having no selection at all implies that you
want to operate on the first visible tag.

This means :promote, :demote, :del et. al. don't work without a
selection or a properly given argument

3 years agoDon't re-release gui thread on SIGWINCH
Jack Miller [Mon, 8 Aug 2016 22:55:05 +0000 (17:55 -0500)]
Don't re-release gui thread on SIGWINCH

While Python Events are obviously thread safe, they're not reentrant so
from a signal context we have to make sure that if we receive a new
signal before we finish processing the old one, we don't attempt to
set() again and deadlock.

This fixes canto-curses locking when you resize your terminal a few
hundred times a second.

3 years agoFix utterly broken tag core new/cur/old detection
Jack Miller [Mon, 8 Aug 2016 18:34:23 +0000 (13:34 -0500)]
Fix utterly broken tag core new/cur/old detection

Turns out when you double sort one list instead of sorting both lists,
assuming that both lists are sorted is a bad idea.

Fortunately, we only used this logic to notify other objects, so the
worst effect is that we woke up the gui thread for nothing, and the
pending item count got out of wack, but in theory it could also remove
items improperly, although I haven't seen that in the wild.

Closes #40

3 years ago0.9.7 v0.9.7
Jack Miller [Wed, 1 Jun 2016 18:42:36 +0000 (13:42 -0500)]
0.9.7

3 years agoUpdate copyrights to 2016
Jack Miller [Wed, 1 Jun 2016 18:39:39 +0000 (13:39 -0500)]
Update copyrights to 2016

3 years agoFix completing empty command lines
Jack Miller [Wed, 1 Jun 2016 03:16:35 +0000 (22:16 -0500)]
Fix completing empty command lines

Closes #37

3 years agoreader-extras.py: Add datetime example
Jack Miller [Wed, 20 Jan 2016 18:08:45 +0000 (12:08 -0600)]
reader-extras.py: Add datetime example

Adds published and updated times, if provided by the item data.

4 years ago0.9.6 v0.9.6
Jack Miller [Mon, 27 Jul 2015 19:42:26 +0000 (14:42 -0500)]
0.9.6

4 years agoFix double-resets
Jack Miller [Mon, 27 Jul 2015 20:50:04 +0000 (15:50 -0500)]
Fix double-resets

tag_updater.reset() is now called from update(), so don't manually do a
reset before.

4 years agoWait inline on each config write
Jack Miller [Mon, 27 Jul 2015 19:35:16 +0000 (14:35 -0500)]
Wait inline on each config write

- Decorator approach still called hooks too early, which basically
  defeats the purpose since that's how it notifies everything and queues
up work

- In practice, you very rarely make changes to multiple sections, and
  even if you the latency should be miniscule.

4 years agoFix :transform (aka :filter :sort)
Jack Miller [Mon, 27 Jul 2015 18:41:30 +0000 (13:41 -0500)]
Fix :transform (aka :filter :sort)

4 years ago0.9.5 v0.9.5
Jack Miller [Thu, 23 Jul 2015 03:08:06 +0000 (22:08 -0500)]
0.9.5

4 years agoFix tag config changes
Jack Miller [Thu, 23 Jul 2015 03:47:29 +0000 (22:47 -0500)]
Fix tag config changes

Accidental breakage when refactoring for the config pending change.

4 years agotests: update config script to handle PING
Jack Miller [Thu, 23 Jul 2015 03:26:50 +0000 (22:26 -0500)]
tests: update config script to handle PING

4 years agoconfig prot_thread can neither set or clear processed flag
Jack Miller [Thu, 23 Jul 2015 02:57:03 +0000 (21:57 -0500)]
config prot_thread can neither set or clear processed flag

This wait would obviously deadlock since the prot_thread is what has to
actual process the PONG and set flag. The good news, however, is that
the config prot_thread is only used on NEW and DELTAGS causing config
changes and any writes stemming from those are pretty much just
informative to the daemon, whereas this mechanism is intended for user
changes being reflected before subsequent requests are made.

4 years agoBind h/left l/right to setting item read / unread
Jack Miller [Wed, 22 Jul 2015 17:05:17 +0000 (12:05 -0500)]
Bind h/left l/right to setting item read / unread

Defaults only, use

:bind h item-state read
:bind l item-state -read

(or left / right if that suits you) to get the binds.

Alternatively, you could ":reset-config taglist" to get all of the
default binds, but obviously that would destroy any non-default binds
too.

4 years agoWrap all config writers in write_config_wait
Jack Miller [Tue, 21 Jul 2015 15:58:49 +0000 (10:58 -0500)]
Wrap all config writers in write_config_wait

This resolves the case in which a config_lock write holder calls
prot_config separately and the config_lock.release at the end of
prot_config doesn't actually full unlock config_lock. Now everything in
config.py that hold write will wait for completion.

4 years ago0.9.4 v0.9.4
Jack Miller [Tue, 14 Jul 2015 19:44:52 +0000 (14:44 -0500)]
0.9.4

4 years agoDocument cursor and scrolling options
Jack Miller [Wed, 15 Jul 2015 17:45:54 +0000 (12:45 -0500)]
Document cursor and scrolling options

4 years agoRemove subthread locks
Jack Miller [Wed, 15 Jul 2015 07:23:21 +0000 (02:23 -0500)]
Remove subthread locks

These are generic in the daemon now.

4 years agoWait for written config changes to be processed
Jack Miller [Wed, 15 Jul 2015 07:15:34 +0000 (02:15 -0500)]
Wait for written config changes to be processed

4 years agoUse xdg-open as default browser
Jack Miller [Tue, 14 Jul 2015 19:40:01 +0000 (14:40 -0500)]
Use xdg-open as default browser

4 years agoAdd some useful settings to :help set
Jack Miller [Tue, 14 Jul 2015 17:26:59 +0000 (12:26 -0500)]
Add some useful settings to :help set

4 years agoRework tag_updater -> tagcore interaction
Jack Miller [Mon, 13 Jul 2015 17:11:08 +0000 (12:11 -0500)]
Rework tag_updater -> tagcore interaction

- ITEMS is now guaranteed to be a single response, so no need to buffer
  content waiting on ITEMSDONE (which is now issued, but ignored).

- The function uses a similar sorted-compare to sync() and the daemon's
  index(), which should make integrating new items take less time and
produce new/removed item hook calls directly.

- The Tagcore object itself has been stripped down.

- Tag_updater "reset" is now basically a no-op, it marks tags as reset,
  but doesn't actually clear their items. Then, "reset" tags are
automatically synchronized and re-sorted the next time items come in.
This saves quite a bit of time when refreshing.

- Tag_updater "update" now works in tandem with reset code, and merely
  sends out ITEMS requests directly.

4 years agoMore sync performance updates
Jack Miller [Mon, 13 Jul 2015 16:47:31 +0000 (11:47 -0500)]
More sync performance updates

This time, scrap it and derive everything from a sorted list comparison
O(nlogn) instead of O(n^2logn).

4 years agoSimplify tag_updater reset/update
Jack Miller [Sun, 12 Jul 2015 05:15:16 +0000 (00:15 -0500)]
Simplify tag_updater reset/update

4 years agoDon't drop parent_tag reference on die()
Jack Miller [Sun, 12 Jul 2015 03:34:20 +0000 (22:34 -0500)]
Don't drop parent_tag reference on die()

4 years agoBetter performance on sync()
Jack Miller [Sun, 12 Jul 2015 03:23:42 +0000 (22:23 -0500)]
Better performance on sync()

4 years agoBetter performance on next/prev tag
Jack Miller [Sun, 12 Jul 2015 02:36:34 +0000 (21:36 -0500)]
Better performance on next/prev tag

Don't need to be checking membership in a tag for every single item now
that we know this off hand.

4 years agoFix first tag items being improperly enumerated
Jack Miller [Wed, 8 Jul 2015 17:32:06 +0000 (12:32 -0500)]
Fix first tag items being improperly enumerated

4 years agoAdd cleantitle to manpage
Jack Miller [Wed, 8 Jul 2015 17:30:08 +0000 (12:30 -0500)]
Add cleantitle to manpage

4 years agocleantitle.py: option to forcibly remove anything that looks like HTML
Jack Miller [Wed, 8 Jul 2015 17:05:09 +0000 (12:05 -0500)]
cleantitle.py: option to forcibly remove anything that looks like HTML

4 years agoAdd cleantitle plugin + Story support
Jack Miller [Wed, 8 Jul 2015 16:50:00 +0000 (11:50 -0500)]
Add cleantitle plugin + Story support

This plugin adds the ability to do simple text replacement on story
titles before they're displayed. Useful for stripping out content that
(according to the feed) should be there, but (according to the user) is
crap. Default case, newlines and some HTML tags that seem to get left
behind occasionally.

4 years agoFix :help commands
Jack Miller [Thu, 25 Jun 2015 17:14:06 +0000 (12:14 -0500)]
Fix :help commands

4 years agoUpdate manpage with XDG paths
Jack Miller [Wed, 24 Jun 2015 21:17:02 +0000 (16:17 -0500)]
Update manpage with XDG paths

4 years agoFix hidden selection on :del
Jack Miller [Tue, 23 Jun 2015 19:59:20 +0000 (14:59 -0500)]
Fix hidden selection on :del

For now, just unset the selection (similar to the initial state). May
want to scroll back/forward to get the nearest selection, but for now
just not being offscreen is okay.

4 years agoRemove config compare from test-screen
Jack Miller [Tue, 23 Jun 2015 18:48:21 +0000 (13:48 -0500)]
Remove config compare from test-screen

With the new color system we expect this config to be fully loaded with
settings. It should be enough just to see that the setting is honored,
instead of rotely checking the colors are identical.

4 years agoUpdate test-screen for unmangled tagorder
Jack Miller [Tue, 23 Jun 2015 18:45:20 +0000 (13:45 -0500)]
Update test-screen for unmangled tagorder

Instead of items in Tag(2), we properly get items in Tag(0), so all of
the checks should expect that now.

4 years agoFix tag order getting mangled on new tags
Jack Miller [Tue, 23 Jun 2015 18:42:44 +0000 (13:42 -0500)]
Fix tag order getting mangled on new tags

4 years agoFix test-screen Gui initialization
Jack Miller [Tue, 23 Jun 2015 18:10:17 +0000 (13:10 -0500)]
Fix test-screen Gui initialization

Takes a GraphicalLog object now and tagupdater init is done after Gui is
instantiated.

4 years agoFix test-tagcore-function for new init
Jack Miller [Tue, 23 Jun 2015 18:07:17 +0000 (13:07 -0500)]
Fix test-tagcore-function for new init

We get hooks called on initial tagcores now.

4 years agoMake sure we setup a watch for new tags
Jack Miller [Sat, 20 Jun 2015 20:58:53 +0000 (15:58 -0500)]
Make sure we setup a watch for new tags

4 years agoFix exception on :del
Jack Miller [Fri, 19 Jun 2015 16:47:38 +0000 (11:47 -0500)]
Fix exception on :del

4 years agoFix accepting -1 as a valid color (default)
Jack Miller [Thu, 18 Jun 2015 14:36:50 +0000 (09:36 -0500)]
Fix accepting -1 as a valid color (default)

4 years agoFix :show-category
Jack Miller [Tue, 16 Jun 2015 04:08:31 +0000 (23:08 -0500)]
Fix :show-category

4 years agoMinor tag hook fix
Jack Miller [Tue, 16 Jun 2015 02:37:12 +0000 (21:37 -0500)]
Minor tag hook fix

4 years agoOnly sync single tags at a time
Jack Miller [Tue, 16 Jun 2015 02:36:23 +0000 (21:36 -0500)]
Only sync single tags at a time

Does well decreasing startup time and being more responsive when items
are turning over quickly (i.e. full refetch).

4 years agoprot_tagchange handles sending ITEMS, no need for update
Jack Miller [Tue, 16 Jun 2015 00:38:03 +0000 (19:38 -0500)]
prot_tagchange handles sending ITEMS, no need for update

4 years agoDo less on init, allow events to drive
Jack Miller [Tue, 16 Jun 2015 00:02:07 +0000 (19:02 -0500)]
Do less on init, allow events to drive

4 years agoAllow "default" to be passed to :color
Jack Miller [Sat, 13 Jun 2015 20:30:21 +0000 (15:30 -0500)]
Allow "default" to be passed to :color

4 years agoAdd color/style reset option to theme-default
Jack Miller [Sat, 13 Jun 2015 20:11:24 +0000 (15:11 -0500)]
Add color/style reset option to theme-default

4 years agoLet :reset-config take a top-level section argument
Jack Miller [Sat, 13 Jun 2015 20:04:03 +0000 (15:04 -0500)]
Let :reset-config take a top-level section argument

So `:reset-config color` or or `:reset-config style` will work without
interfering with the rest of the config.

4 years agoAdd config_version to template config
Jack Miller [Sat, 13 Jun 2015 19:51:04 +0000 (14:51 -0500)]
Add config_version to template config

Keeps :reset-config from confusing everything.

4 years agoInclude default tag theme in theme-default.py
Jack Miller [Sat, 13 Jun 2015 19:30:37 +0000 (14:30 -0500)]
Include default tag theme in theme-default.py

4 years agoAdd theme-default plugin
Jack Miller [Sat, 13 Jun 2015 19:22:12 +0000 (14:22 -0500)]
Add theme-default plugin

Show a basic plugin implementing the canto default theme.

Needs to be expanded to include colors, tags, and possibly the reader.

4 years agoReorder story theme colors
Jack Miller [Sat, 13 Jun 2015 18:57:14 +0000 (13:57 -0500)]
Reorder story theme colors

This prioritizes the addition of color codes so that more specific
information overrides less specific information.

For example, "selected" is now enabled after "unread" so that ":color
selected white" will turn the single selection white instead of having
that color overridden by the unread color which is far more general.

4 years agoDon't warn on command validation with obvious fallback
Jack Miller [Thu, 11 Jun 2015 02:26:01 +0000 (21:26 -0500)]
Don't warn on command validation with obvious fallback

4 years agoDisplay early log errors/warns graphically
Jack Miller [Thu, 11 Jun 2015 02:03:42 +0000 (21:03 -0500)]
Display early log errors/warns graphically

Instantiate the GraphicalLog object much earlier, so it can defer any
WARN/ERROR level logging. This allows stuff like config errors or
migration warnings to be displayed in the client instead of just in the
log.

4 years agoFix :help command completion
Jack Miller [Tue, 9 Jun 2015 18:12:07 +0000 (13:12 -0500)]
Fix :help command completion

4 years agoMinor fix for :style help output
Jack Miller [Tue, 9 Jun 2015 17:33:32 +0000 (12:33 -0500)]
Minor fix for :style help output

- First line should be suitable for including in :help commands

4 years agoAdd :style command
Jack Miller [Tue, 9 Jun 2015 17:28:22 +0000 (12:28 -0500)]
Add :style command

Allow easy manipulation of curses styles (normal, bold, reverse,
standout, underline).

4 years agoFix color manager with long code colors
Jack Miller [Sun, 7 Jun 2015 16:48:22 +0000 (11:48 -0500)]
Fix color manager with long code colors

4 years agoAdd check_program to curses plugins
Jack Miller [Sat, 6 Jun 2015 19:22:25 +0000 (14:22 -0500)]
Add check_program to curses plugins

4 years agoAdd config migration
Jack Miller [Fri, 5 Jun 2015 18:01:08 +0000 (13:01 -0500)]
Add config migration

- With initial case for new color system

4 years agoFixup so old parser imports
Jack Miller [Fri, 5 Jun 2015 17:52:56 +0000 (12:52 -0500)]
Fixup so old parser imports

4 years agoMake :color work with symbolic color, improve help text
Jack Miller [Fri, 5 Jun 2015 01:58:54 +0000 (20:58 -0500)]
Make :color work with symbolic color, improve help text

4 years agoMass conversion to better log.debug use
Jack Miller [Fri, 5 Jun 2015 00:51:32 +0000 (19:51 -0500)]
Mass conversion to better log.debug use

Pass the format arguments to log.debug so we avoid the CPU hit
formatting strings we won't use.

4 years agoConvert to symbolic colors
Jack Miller [Thu, 4 Jun 2015 03:10:02 +0000 (22:10 -0500)]
Convert to symbolic colors

Use color "unread", for example, instead of embedding a color code
directly. This gives finer grain control.

4 years agoChange color validator to do whole block
Jack Miller [Thu, 4 Jun 2015 02:12:20 +0000 (21:12 -0500)]
Change color validator to do whole block

4 years agoRemove theme attr_debug
Jack Miller [Wed, 3 Jun 2015 21:30:14 +0000 (16:30 -0500)]
Remove theme attr_debug

4 years agoRemove theme parser
Jack Miller [Wed, 3 Jun 2015 21:23:32 +0000 (16:23 -0500)]
Remove theme parser

This is far better done in Python with plugins instead of a clusterfuck
of escapes and shite.

4 years agoCleanup command.py
Jack Miller [Mon, 1 Jun 2015 17:25:56 +0000 (12:25 -0500)]
Cleanup command.py

Stop using arbitrary references into tuples, in favor of actually having
an object with named variables.

4 years agoMake j/k scrolling work in generic info box (:help)
Jack Miller [Mon, 1 Jun 2015 16:44:45 +0000 (11:44 -0500)]
Make j/k scrolling work in generic info box (:help)

4 years agoMake tab completion behave more like bash
Jack Miller [Mon, 1 Jun 2015 16:27:49 +0000 (11:27 -0500)]
Make tab completion behave more like bash

In terms of cursor position, and behavior when you start doing stuff
other than hitting tab.

4 years agoAdd "quiet" variable to shutup graphical log output
Jack Miller [Wed, 20 May 2015 22:06:36 +0000 (17:06 -0500)]
Add "quiet" variable to shutup graphical log output

- Update autocmd plugin to use it as well.

4 years agoMerge pull request #23 from dkasak/master
Jack Miller [Sun, 17 May 2015 20:09:52 +0000 (15:09 -0500)]
Merge pull request #23 from dkasak/master

yank.py: Fix problems with yanking shell metacharacters.

4 years agoyank.py: Fix problems with yanking shell metacharacters.
Denis Kasak [Tue, 12 May 2015 19:50:28 +0000 (21:50 +0200)]
yank.py: Fix problems with yanking shell metacharacters.

Switch to using the subprocess module instead of going through the shell
(via system()) since the latter is problematic if the string to be
yanked contains shell metacharacters.

4 years ago0.9.3 v0.9.3
Jack Miller [Tue, 7 Apr 2015 13:55:57 +0000 (08:55 -0500)]
0.9.3

4 years agoSimplify use of extra_lines
Jack Miller [Wed, 25 Mar 2015 00:12:56 +0000 (19:12 -0500)]
Simplify use of extra_lines

Fixes borders not appearing at the end of a full screen

4 years agoUnhide "color" command
Jack Miller [Tue, 24 Mar 2015 23:41:50 +0000 (18:41 -0500)]
Unhide "color" command

4 years ago%C escape suspends colors as well as attributes
Jack Miller [Tue, 24 Mar 2015 20:10:45 +0000 (15:10 -0500)]
%C escape suspends colors as well as attributes

4 years agoFix butchering 0 width space characters (\n)
Jack Miller [Mon, 23 Mar 2015 22:27:10 +0000 (17:27 -0500)]
Fix butchering 0 width space characters (\n)

Introduced in last commit.

4 years agoBetter handling of invalid multi-byte sequences
Jack Miller [Tue, 17 Mar 2015 20:25:15 +0000 (15:25 -0500)]
Better handling of invalid multi-byte sequences

Occasionally, feed data has some weird multi-bytes sequences that both
mbtowc and mbstowcs don't like. It looks like browsers handle them okay,
but I haven't found a single command line program (not even vim) that
can handle them well so for now just skip over anything for which mbtowc
returns -1 for.

4 years agoFiner grain defaults.* change reporting
Jack Miller [Tue, 17 Mar 2015 16:41:12 +0000 (11:41 -0500)]
Finer grain defaults.* change reporting

4 years agoEnsure strtags has no duplicates, even pre-init
Jack Miller [Tue, 17 Mar 2015 16:37:03 +0000 (11:37 -0500)]
Ensure strtags has no duplicates, even pre-init

If we get more than one NEWTAG pre-init, we weren't checking if we'd
already recorded it in strtags.

4 years ago0.9.2 v0.9.2
Jack Miller [Wed, 4 Feb 2015 22:18:06 +0000 (16:18 -0600)]
0.9.2

4 years agoBetter version of previous commit
Jack Miller [Fri, 30 Jan 2015 22:33:31 +0000 (16:33 -0600)]
Better version of previous commit

- Sub this is on newitems instead of converting redraw into a full loop.

4 years agoStub in curpos for offscreen items
Jack Miller [Fri, 30 Jan 2015 22:07:41 +0000 (16:07 -0600)]
Stub in curpos for offscreen items

This should quash the curpos exceptions, and possibly a hard lock
related to them. Stub them in as self.height, which is short hand for
"off screen down" as it should cause a scroll.

Calculating the actual value would cause the redraw function to scale
linearly with number of items instead of (the much smaller and usually
constant) value of the screen size.