Commit graph

11 commits

Author SHA1 Message Date
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
tobi-wan-kenobi
30c1f712a6 [formatting] reformat using "black -t py34"
getting rid of thinking about consistent formatting...
2020-05-03 11:15:52 +02:00
tobi-wan-kenobi
ba24ba13db [core/input] add default workspace wrap bindings (mouse wheel up/down) 2020-05-02 13:54:45 +02:00
tobi-wan-kenobi
04fc9867ac [core/input] Move event handling to core.event
Until now, bumblebee-status did event handling in two places with almost
identical code: in core.event (makes sense) and core.input (still makes
sense, but a bit more dubious).

Changed core.input to use core.event
2020-04-04 13:52:10 +02:00
tobi-wan-kenobi
52e5ad7b43 [core/input] Handle exceptions for non-existent commands 2020-04-04 08:17:35 +02:00
tobi-wan-kenobi
77443b7802 [tests/theme] Add more theme tests 2020-04-04 08:03:03 +02:00
tobi-wan-kenobi
0f6dfb3f1a [core/input] do not throw on wrong event type
until now, if a module had registered callbacks, events for nonexistent
buttons caused the trigger mechanism to raise an exception.
2020-04-02 16:21:07 +02:00
tobi-wan-kenobi
95410e4adf [core/input] __ for private variables, use id as property 2020-03-29 14:43:04 +02:00
Tobias Witek
468e30ce66 [main] Add input thread logic and logging
To the main application, add an input thread that "simply" reads
sys.stdin events and transmits them via core.input.

Additionally, set up some initial logging (yeah, for threading, this is
needed immediately)
2020-02-08 13:56:52 +01:00
Tobias Witek
4d34fa9261 [core/input] Use util.cli to execute commands
If the registered callback is not callable (i.e. no Python method),
assume it's a command that should be invoked via a shell.
2020-02-08 13:40:51 +01:00
Tobias Witek
e0df8b84e5 [core] Add input handling
Add a (half-finished) input library, that for now simply allows
registration and triggering of events.

As next steps, the trigger will happen as part of a separate thread that
reads input events.

Additionally, invoking commands via a execute() will be supported.

Thirdly, there is need of a way to selectively update the affected
modules (widgets), which should be possible given that the event
contains both the instance (widget ID) and name (module name).
2020-02-07 21:28:29 +01:00