Commit graph

71 commits

Author SHA1 Message Date
tobi-wan-kenobi
cb9a60668a [core/theme] Fix detection of "best matching theme"
Previous code accepted the "first" hit in a theme - particularly, if a
module is called "A" and a *different* module "B" uses "A" as state, a
widget of module B with state A would be themed as *module* A, wrongly.

Essentially, made sure that the last (most specific) themeing "wins".

fixes #647
2020-06-04 20:56:31 +02:00
tobi-wan-kenobi
23d7222576 [core/theme] take alias into consideration when themeing
see #643
2020-06-03 07:59:09 +02:00
tobi-wan-kenobi
5e40dfb28a [all] small fixed picked up by pytest
- unicode stuff
- make all regexps regex strings
2020-06-02 20:13:39 +02:00
tobi-wan-kenobi
9cadcee844 [core/events] simplify args/kwargs detection 2020-06-01 11:35:26 +02:00
tobi-wan-kenobi
547874dafd [core/module] allow modules to perform updates in background
a module can now set `self.background = True` in its `__init__()` method
to make sure its update method is invoked in a separate thread.

also, do a PoC implementation of this for the github module.

TODO: add this to dev doc

see #640
2020-05-30 17:22:02 +02:00
Tobias Witek
f1ce5e162a [theme] load custom iconset first
the "merge" algorithm only fills in missing elements - i.e. the most
important pieces of a data structure must be filled in first. since the
iconset specified on the CLI takes precedence over anything present in
the config, load the CLI-provided iconset *first*.

hopefully fixes #634
2020-05-26 07:56:04 +02:00
tobi-wan-kenobi
3d14931cb7 [docs] add new module 2020-05-23 16:55:24 +02:00
tobi-wan-kenobi
922575fcda [core/widget] make arbitrary modules scrollable
Use a boolean parameter "scrolling" that's applied generically to
modules to allow arbitrary modules to scroll.

see #606

TODO: Add to documentation
2020-05-18 13:13:06 +02:00
tobi-wan-kenobi
e359c75603 [core/widget] remove module from widget initializer 2020-05-18 12:59:47 +02:00
tobi-wan-kenobi
1355a7e5d3 [core/decorators] add docstrings 2020-05-16 15:28:15 +02:00
tobi-wan-kenobi
a697500491 [core] add debugging around click events
log commandline outputs and errors. allow input handlers to be
configured as "waiting" for debugging purposes.

see #628
2020-05-16 15:16:23 +02:00
tobi-wan-kenobi
02a80840a1 [core] more black'ing 2020-05-16 12:00:55 +02:00
tobi-wan-kenobi
eea3c758de [core/input] Invoke commands in a subshell
add shell capability to util.cli and make sure that the input module
uses that to reliably spawn whatever command the user wants to run.

see #628
2020-05-16 11:43:43 +02:00
Pavle Portic
a8df4a5f9d
Handle n+1 characters in the scrolling decorator 2020-05-15 20:31:37 +02:00
tobi-wan-kenobi
3bb2fb8247 [core/module] add missing registration of input events via CLI
see #628
2020-05-15 19:59:13 +02:00
tobi-wan-kenobi
835ed070e5 [core/module] Add docstrings 2020-05-15 10:22:10 +02:00
tobi-wan-kenobi
526560ea54 [core/decorators] use difflib to make scrolling reset detection fuzzy
when scrolling text that is subject to *slight* changes (e.g. a song
that contains the current position within the song), allow for slight
variations in the displayed text.

fixes #629
2020-05-14 20:35:09 +02:00
tobi-wan-kenobi
b4f8870a95 [doc] update API docs 2020-05-10 13:25:13 +02:00
tobi-wan-kenobi
b803f385a1 [tests] Fix failing tests 2020-05-10 12:56:30 +02:00
tobi-wan-kenobi
92577e7d26 [all] black code :) 2020-05-09 21:24:28 +02:00
tobi-wan-kenobi
320827d577 [core] restructure to allow PIP packaging
OK - so I have to admit I *hate* the fact that PIP seems to require a
subdirectory named like the library.

But since the PIP package is something really nifty to have (thanks to
@tony again!!!), I updated the codebase to hopefully conform with what
PIP expects. Testruns so far look promising...
2020-05-09 21:22:00 +02:00