canto-curses.git
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.

4 years ago0.9.1 v0.9.1
Jack Miller [Fri, 9 Jan 2015 21:09:17 +0000 (15:09 -0600)]
0.9.1

4 years agoDon't count items already in interface as pending updates
Jack Miller [Fri, 9 Jan 2015 22:17:01 +0000 (16:17 -0600)]
Don't count items already in interface as pending updates

The data has made a round trip, but this makes the grey update indicator
into an pending new item count instead of something more nebulous.

4 years agoMake tag-list defaults include first_sel
Jack Miller [Wed, 17 Dec 2014 19:06:05 +0000 (13:06 -0600)]
Make tag-list defaults include first_sel

Similar to item-list, tag-list operations should assume the first
visible tag, if there's no selection to base it on.

4 years agoStop locking on variable changes
Jack Miller [Fri, 9 Jan 2015 15:51:17 +0000 (09:51 -0600)]
Stop locking on variable changes

- var_lock was merged with config_lock to avoid having a million
deadlock cases

- locking on vars now really hampers performance

- most vars are accessed by only a single thread (i.e. used as
  out-of-instance storage for classes that need to resize, which would
only be handled by the gui) so the locking for these is totally
unnecessary

- vars that are accessed by multiple threads are probably already
  serialized by sync lock (i.e. input thread holds sync while it
performs a command that changes selection, gui thread holds sync while
the Taglist uses that selection info).

- the GIL prevents any C-like sort of half-way splinched assignment

- config_lock could probably be done away with entirely at this point,
  but I'm more concerned that there could be a reason to do an atomic
change to multiple variables at some point.

I'm taking a wait and see approach on this. The ultimate test for
whether a lock is unnecessary is removing the lock =P.

4 years agoUpdate error box color
Jack Miller [Wed, 17 Dec 2014 18:54:50 +0000 (12:54 -0600)]
Update error box color

4 years agoAdd selection preservation test
Jack Miller [Wed, 17 Dec 2014 18:53:30 +0000 (12:53 -0600)]
Add selection preservation test

- Make sure that selections that disappear from the tagcore remain in
  the tag

- Make sure they are then eliminated when no longer selected and an
  update occurs

4 years agoToss undead former selections faster
Jack Miller [Wed, 17 Dec 2014 18:49:37 +0000 (12:49 -0600)]
Toss undead former selections faster

When preserving the selection, we keep items in the graphical Tag that
are no longer in the TagCore. That's fine, but we need to re-evaluate
that tag next time a sync is requested, despite the fact that the
underlying TagCore may not have changed.

This should make formerly selected items disappear faster.

4 years agoSet working flag earlier
Jack Miller [Tue, 16 Dec 2014 03:18:04 +0000 (21:18 -0600)]
Set working flag earlier

We want to be able to use it with sync_requested to determine if the gui
thread is in progress, so close the window where they're both false.

4 years agoTagcore script should include PING -> PONG
Jack Miller [Tue, 16 Dec 2014 01:58:39 +0000 (19:58 -0600)]
Tagcore script should include PING -> PONG

On refresh, it uses this to know when the old responses have stopped
coming in.

4 years agoFix missing import on exception
Jack Miller [Fri, 12 Dec 2014 02:53:24 +0000 (20:53 -0600)]
Fix missing import on exception

4 years agoMake summarize + collapse tests functional
Jack Miller [Sat, 29 Nov 2014 17:11:55 +0000 (11:11 -0600)]
Make summarize + collapse tests functional

4 years agoUpdate test wait to use gui.working
Jack Miller [Sat, 29 Nov 2014 02:39:00 +0000 (20:39 -0600)]
Update test wait to use gui.working

4 years agoAdd gui.working for testing
Jack Miller [Sat, 29 Nov 2014 02:37:08 +0000 (20:37 -0600)]
Add gui.working for testing

Instead of waiting for needs_refresh et. al. to be cleared, wait on that
and gui.working to make sure that it's actually done. This allows us to
wait until all of the refresh/redrawing is done, but still clear the
needs_* conditions before we run them (which allows them to indirectly
queue up another pass if necessary).

4 years agoMake curses tests output log to stdout
Jack Miller [Sat, 29 Nov 2014 02:03:32 +0000 (20:03 -0600)]
Make curses tests output log to stdout

4 years agoMinor taglist in tags -> is_tag change
Jack Miller [Sat, 29 Nov 2014 02:03:00 +0000 (20:03 -0600)]
Minor taglist in tags -> is_tag change

4 years agoModify "marked" style
Jack Miller [Thu, 27 Nov 2014 19:49:17 +0000 (13:49 -0600)]
Modify "marked" style

4 years agoDon't throw exception on improper theme %0
Jack Miller [Thu, 27 Nov 2014 19:39:54 +0000 (13:39 -0600)]
Don't throw exception on improper theme %0

4 years agoStop locking on WINCH
Jack Miller [Wed, 26 Nov 2014 07:18:27 +0000 (01:18 -0600)]
Stop locking on WINCH

4 years agoReorganize test-screen
Jack Miller [Wed, 26 Nov 2014 04:22:49 +0000 (22:22 -0600)]
Reorganize test-screen

- Push startup into __init__ with some basic sanity testing
- Add some taglist checks
- Move individual command post-condition tests into functions

4 years agoMore screen init tweaks
Jack Miller [Wed, 26 Nov 2014 04:12:00 +0000 (22:12 -0600)]
More screen init tweaks

This is for testing, mostly. Most of the time, the updates are triggered
by items that are arriving over time, but in a test environment with
rigid timing constraints and items pre-loaded, there are no subsequent
events to cause a refresh.

4 years agoTheme + color fixes and tweaks
Jack Miller [Tue, 25 Nov 2014 22:20:13 +0000 (16:20 -0600)]
Theme + color fixes and tweaks

- If you have customized your format strings, you needs to subtract one
  from all color codes (i.e. %3 should now be %2). %1 should now be
erased as well as the default color pair is always applied.

- attron won't overwrite a color if given color_pair(0), so attroff
  needs to be called explicitly on color changes.

4 years agoStrip more selection maintaining logic
Jack Miller [Tue, 25 Nov 2014 22:17:49 +0000 (16:17 -0600)]
Strip more selection maintaining logic

- Was causing the gui loop to never terminate because every refresh was
  setting and unsetting the selection trying to maintain.

4 years agoExpand screen test to test :color
Jack Miller [Tue, 25 Nov 2014 05:29:30 +0000 (23:29 -0600)]
Expand screen test to test :color

4 years agoFix bad pair referencing in fake_curses
Jack Miller [Tue, 25 Nov 2014 04:54:24 +0000 (22:54 -0600)]
Fix bad pair referencing in fake_curses

4 years agoRecord output of TestBackends
Jack Miller [Tue, 25 Nov 2014 04:29:55 +0000 (22:29 -0600)]
Record output of TestBackends

4 years agoLoop gui_thread until no re(draw/fresh/size)s required
Jack Miller [Tue, 25 Nov 2014 04:28:51 +0000 (22:28 -0600)]
Loop gui_thread until no re(draw/fresh/size)s required

4 years agoAdd indicator of pending updates to tag header
Jack Miller [Tue, 25 Nov 2014 03:45:54 +0000 (21:45 -0600)]
Add indicator of pending updates to tag header

4 years agoTrack attributes in fake_curses
Jack Miller [Tue, 25 Nov 2014 03:43:55 +0000 (21:43 -0600)]
Track attributes in fake_curses

4 years agoBasic overall testing environment
Jack Miller [Mon, 24 Nov 2014 08:41:13 +0000 (02:41 -0600)]
Basic overall testing environment

- A replacement main.py that overrides curses and friends to provide a
  print friendly, easily reproducible daemon-less test environment.

4 years agoAdd ability to generate stub item scripts
Jack Miller [Mon, 24 Nov 2014 05:13:22 +0000 (23:13 -0600)]
Add ability to generate stub item scripts

4 years agoAllow scripts to specify multiple responses
Jack Miller [Mon, 24 Nov 2014 03:32:36 +0000 (21:32 -0600)]
Allow scripts to specify multiple responses

- Useful for ITEMS, the responses to which are ITEMS, ITEMSDONE, and
  usually an automatic ATTRIBUTES response.

4 years agoAdd tagcore function test
Jack Miller [Mon, 24 Nov 2014 00:48:23 +0000 (18:48 -0600)]
Add tagcore function test

4 years agoFix del_tagcore
Jack Miller [Mon, 24 Nov 2014 00:12:56 +0000 (18:12 -0600)]
Fix del_tagcore

4 years agoRemoving an empty tagcore shouldn't cause items_removed
Jack Miller [Sun, 23 Nov 2014 23:36:14 +0000 (17:36 -0600)]
Removing an empty tagcore shouldn't cause items_removed

4 years agoAttributes for items still in tagcore shouldn't be removed
Jack Miller [Sun, 23 Nov 2014 23:28:47 +0000 (17:28 -0600)]
Attributes for items still in tagcore shouldn't be removed

- on the curses_stories_removed hook, which only means that the
  graphical Tag objects have removed it.

4 years agoMove compare functions into Test base
Jack Miller [Sun, 23 Nov 2014 22:16:01 +0000 (16:16 -0600)]
Move compare functions into Test base

4 years agoAdd config function test
Jack Miller [Sun, 23 Nov 2014 22:09:16 +0000 (16:09 -0600)]
Add config function test

Tests hooks getting called, switch_tags, successful config change.

Should probably be expanded to cover the config options that c-c doesn't
honor (that are just relayed to whatever) and tag options, but for now
core functionality is good.

4 years agoChanges to CantoCurses.tags should cause eval_tags()
Jack Miller [Sun, 23 Nov 2014 22:06:53 +0000 (16:06 -0600)]
Changes to CantoCurses.tags should cause eval_tags()

4 years agoFix DELTAGS config change hooks
Jack Miller [Sun, 23 Nov 2014 21:34:29 +0000 (15:34 -0600)]
Fix DELTAGS config change hooks

4 years agoConfig switch_tags should take strings, not Tag objects
Jack Miller [Sun, 23 Nov 2014 21:03:32 +0000 (15:03 -0600)]
Config switch_tags should take strings, not Tag objects

4 years agoWhitespace
Jack Miller [Sun, 23 Nov 2014 20:26:45 +0000 (14:26 -0600)]
Whitespace

4 years agoWe don't need to handle selection re-add anymore
Jack Miller [Sun, 23 Nov 2014 19:47:31 +0000 (13:47 -0600)]
We don't need to handle selection re-add anymore

Since we moved protection to the client side, selection won't just
disappear anymore.

4 years agoCause individual Tag sync when TagCore gets first item
Jack Miller [Sun, 23 Nov 2014 19:47:08 +0000 (13:47 -0600)]
Cause individual Tag sync when TagCore gets first item

This is an optimization for startup and for other reset actions like
changing filters.

4 years agoSort Tags() after a reset has occurred
Jack Miller [Sun, 23 Nov 2014 19:13:55 +0000 (13:13 -0600)]
Sort Tags() after a reset has occurred

This was working on some computers before, but only because a sync()
event may occur while the tags are empty, waiting for the update. So
don't leave it up to chance now.

4 years agoEliminate config-managed alltags
Jack Miller [Sun, 23 Nov 2014 07:31:22 +0000 (01:31 -0600)]
Eliminate config-managed alltags

Instead of issuing the .die() calls to Tag() objects, they can use the
hooks. This has a side-effect of eval_tags being quicker to respond to
tag changes.

4 years agoDefer _all_ graphical logging
Jack Miller [Sun, 23 Nov 2014 07:29:02 +0000 (01:29 -0600)]
Defer _all_ graphical logging

4 years agoUse new hook mass unloading
Jack Miller [Sun, 23 Nov 2014 04:47:04 +0000 (22:47 -0600)]
Use new hook mass unloading

4 years agoAdd config validator test
Jack Miller [Sun, 23 Nov 2014 02:49:43 +0000 (20:49 -0600)]
Add config validator test

Not sure if this is totally anemic and should test every specific
validator or be left as is, just ensuring that when a validator fails
its value is properly rejected.

Definite room for expansion.

4 years agoEnable completion for categories and user tags
Jack Miller [Sun, 23 Nov 2014 02:36:20 +0000 (20:36 -0600)]
Enable completion for categories and user tags

4 years agoCall a hook on tag update cycle completion
Jack Miller [Sun, 23 Nov 2014 01:53:50 +0000 (19:53 -0600)]
Call a hook on tag update cycle completion

Taglist then uses it to force sync when a full barrage of ITEMS calls
has come back in. Works on startup and when requested (i.e. :refresh /
C-r)

4 years agoAdd processed hook to TestBackend, fix inject
Jack Miller [Sat, 22 Nov 2014 21:23:30 +0000 (15:23 -0600)]
Add processed hook to TestBackend, fix inject

Inject now waits until the protocol has been written, read, and
processed.

4 years agoAdd a processed() call for subthread testing
Jack Miller [Sat, 22 Nov 2014 21:23:00 +0000 (15:23 -0600)]
Add a processed() call for subthread testing

This allows us to know when the protocol function has returned.

4 years agoDo basic config variable init earlier
Jack Miller [Sat, 22 Nov 2014 21:22:12 +0000 (15:22 -0600)]
Do basic config variable init earlier

We want tests to have access to them without actually init'ing the
subthread.

4 years agoImprove base test class
Jack Miller [Sat, 22 Nov 2014 20:40:35 +0000 (14:40 -0600)]
Improve base test class

- Catch check exceptions and report them as failures
- Setup a basic logger so internal logging will show up in ouput

4 years agoMinor refactor
Jack Miller [Sat, 22 Nov 2014 19:54:31 +0000 (13:54 -0600)]
Minor refactor

Having separate binaries ensures that the environment is clean between
tests. Need to add a little bash harness to call the various tests and
output information though.

4 years agoBeginning of a test suite
Jack Miller [Sat, 22 Nov 2014 19:43:45 +0000 (13:43 -0600)]
Beginning of a test suite

4 years ago0.9.0 v0.9.0
Jack Miller [Wed, 19 Nov 2014 17:53:23 +0000 (11:53 -0600)]
0.9.0

5 years agoAppend category summary to :categories
Jack Miller [Tue, 18 Nov 2014 02:42:52 +0000 (20:42 -0600)]
Append category summary to :categories

- In addition to listing the categories of the current tag

5 years agoAdd 'tags' command to list tags of a specific item
Jack Miller [Mon, 17 Nov 2014 22:13:52 +0000 (16:13 -0600)]
Add 'tags' command to list tags of a specific item

5 years agoTouch up smartlink docs
Jack Miller [Mon, 17 Nov 2014 19:37:59 +0000 (13:37 -0600)]
Touch up smartlink docs

- Mention in manpage
- Mention using :fetch instead of :goto in the plugin itself

5 years agoRegister gui.py commands in "Base" group
Jack Miller [Mon, 17 Nov 2014 18:27:13 +0000 (12:27 -0600)]
Register gui.py commands in "Base" group

Keeps them from being hidden from :help et. al.

5 years agoMore deferred logging tweaks
Jack Miller [Mon, 17 Nov 2014 16:30:14 +0000 (10:30 -0600)]
More deferred logging tweaks

- Fix emit
- Fix exception on gui thread startup

5 years agoAdd 'update' command
Jack Miller [Sun, 16 Nov 2014 01:50:48 +0000 (19:50 -0600)]
Add 'update' command

This will sync items without throwing away all of the state, the same
mechanism that the update.* config options control.

In addition \ and F5 binds now use this. Refresh is still C-r

5 years agoMinor deferred logging cleanup
Jack Miller [Sun, 16 Nov 2014 01:40:50 +0000 (19:40 -0600)]
Minor deferred logging cleanup

5 years agoFix offset initializations
Jack Miller [Sun, 16 Nov 2014 01:08:23 +0000 (19:08 -0600)]
Fix offset initializations

5 years agoFix update.style maintain
Jack Miller [Sun, 16 Nov 2014 00:16:30 +0000 (18:16 -0600)]
Fix update.style maintain