Commit graph

29 commits

Author SHA1 Message Date
tobi-wan-kenobi
320bba97d0 [core/theme] Make theme iconsets *not* override settings
Make sure that iconsets used as part of a theme do *not* override
anything already existing inside the theme.

Only iconsets that are manually specified can override settings in the
theme now (because those, you typically specify on the CLI).

TODO: Write unit test for this

fixes #666
2020-06-28 20:01:08 +02:00
tobi-wan-kenobi
72deb7eaf8 [modules] add speed test module 2020-06-25 20:34:35 +02:00
Tobias Witek
441e7d5041 [core] fix minimize for all modules (nic, traffic, etc.)
make it possible to toggle the display state of a widget between
"displayed" and "minimized" also for modules that re-create their
widgets during each iteration.

see #661
2020-06-23 20:03:17 +02:00
Tobias Witek
34dadadf90 [core] re-enable minimize of widgets
by default, allow toggling the minimized state of a widget via the
middle mouse and draw a single unicode char instead of the actual
widget, maintaining all states.

fixes #661
2020-06-23 15:51:14 +02:00
Tobias Witek
b2e92d816d [tests] add pytest for core.output
see #642
2020-06-20 14:51:49 +02:00
tobi-wan-kenobi
16269ff01e [core/input] add variables to custom cli calls
when specifying event bindings via CLI (e.g. disk.left-click=thunar),
allow for variables ({instance} and {name}, in particular).

fixes #650
2020-06-09 20:29:51 +02:00
tobi-wan-kenobi
ba82f5a50f [core/theme] Fix loading of iconsets
* First, make iconsets override anything already present in the "base"
configuration
* Second, make sure that CLI provided iconsets have higher priority than
"built-in" ones

see #648
2020-06-06 15:59:19 +02:00
tobi-wan-kenobi
034e8eefb9 [core/theme] make iconsets take precedence over "main" theme
see #648
2020-06-05 20:10:50 +02:00
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