Commit graph

1533 commits

Author SHA1 Message Date
tobi-wan-kenobi
f5052473fb [core] Add preliminary block abstraction to output
The idea is to simplify the way the output module currently works by:
- introducing an abstraction that represents blocks; these abstractions
  contain all data - uninterpreted - required to draw a block
- separately from that, whenever the block is serialized into JSON,
  do the interpretation (pango vs. non-pango, etc.)

This - theoretically - should simplify code by creating two separate
concerns: collecting the data and actually interpreting it.
2020-04-05 10:53:17 +02:00
tobi-wan-kenobi
b5c2ca6ccf [core/output] Add generic pango support
Allow any piece of a theme that specifies a set of attributes (default,
cycles, states, widgets) to use pango *instead* of the usual attributes.

If pango is present, this will have precedence.

A practical example of this can be found in the powerline-pango theme,
which is added solely for demonstration purposes.

fixes #531
2020-04-04 14:38:37 +02:00
tobi-wan-kenobi
89247d834b [core/widget] Use __ for private variables 2020-04-04 13:58:22 +02:00
tobi-wan-kenobi
7547537c81 [core/event] Remove debug output 2020-04-04 13:57:54 +02:00
tobi-wan-kenobi
a6eb6c3a11 [core/output] Use __ for private variables 2020-04-04 13:57:42 +02:00
tobi-wan-kenobi
3aeec1c7e6 [core/module] Use __ for private variables 2020-04-04 13:55:54 +02:00
tobi-wan-kenobi
476b2000f9 [core/config] Use __ for private variables and methods 2020-04-04 13:54:08 +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
a43917594e [tests/event] Add some more tests for trigger-time args 2020-04-04 08:44:41 +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
944b223f1e [doc] small updates 2020-04-04 08:04:48 +02:00
tobi-wan-kenobi
77443b7802 [tests/theme] Add more theme tests 2020-04-04 08:03:03 +02:00
tobi-wan-kenobi
a71828f0b4 [modules/weather] Small improvements 2020-04-04 07:47:53 +02:00
tobi-wan-kenobi
a7effbff78 [modules/weather] move to contrib 2020-04-02 22:10:37 +02:00
tobi-wan-kenobi
5ff0269662 [modules/weather] Update to new API 2020-04-02 22:10:18 +02:00
tobi-wan-kenobi
d0200b656d [core/config] Allow string formatted intervals
Allow users to specify intervals such as '5m', for convenience
2020-04-02 16:55:36 +02:00
tobi-wan-kenobi
18154dd74f [modules] Adjust update schedules
Make a few modules update more seldomly, to reduce CPU consumption.
2020-04-02 16:30:31 +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
2756f8fbb3 [core/theme] Fix retrieval of rotating theme values (e.g. battery)
When rotating theme values (e.g. the "charge" icon of the battery
module(s)), until now, the code just showed the raw list (because it
wasn't aware of the need to rotate).
2020-04-02 12:51:08 +02:00
tobi-wan-kenobi
658fbd2c1c [modules/hddtemp] Update to new API 2020-03-31 21:06:44 +02:00
tobi-wan-kenobi
52ca6e5a43 [modules/hddtemp] double to single quotes 2020-03-31 21:03:30 +02:00
tobi-wan-kenobi
0873a58dc0 [modules] Re-added hddtemp 2020-03-31 21:03:07 +02:00
tobi-wan-kenobi
885cc09636 [core/output] Add some more tests 2020-03-31 20:57:09 +02:00
tobi-wan-kenobi
232dcb733e [doc] Improve HOWTO_MODULE 2020-03-30 21:51:46 +02:00
tobi-wan-kenobi
f262080e78 [modules/shell] Small refactoring
Use threads a bit differently do make do with fewer helper functions.
2020-03-30 21:18:28 +02:00
tobi-wan-kenobi
422a9986b4 [modules/shell] Update to new API 2020-03-30 21:09:09 +02:00
tobi-wan-kenobi
251a23d2f1 [modules/shell] double quotes -> single quotes 2020-03-30 20:56:35 +02:00
tobi-wan-kenobi
006a729be3 [modules] re-add shell module 2020-03-30 20:56:08 +02:00
tobi-wan-kenobi
95410e4adf [core/input] __ for private variables, use id as property 2020-03-29 14:43:04 +02:00
tobi-wan-kenobi
428b627daf [core/events] Use __ for private variables 2020-03-29 14:37:30 +02:00
tobi-wan-kenobi
c625baa47a [core] Move "every" to decorators module 2020-03-29 14:36:44 +02:00
tobi-wan-kenobi
11ebcee29a [tests] Fix kernel module test 2020-03-29 14:35:20 +02:00
tobi-wan-kenobi
bd7ff3c8f1 [core] Allow modules to specify default update interval
Expanding on the implementation in d582016, add a decorator
`core.module.every()` that allows a module to specify how often to
update the module's state.

This can still be overridden using the CLI parameter `interval`.
2020-03-29 14:32:47 +02:00
tobi-wan-kenobi
b66b13211e [modules/dunst] Fix toggling
At least Void Linux doesn't like kill -SIGUSR<N>

Also, added some debugging to inspect state changes for modules/widgets.

Also also, fix problem with min width, if no minwidth is set
2020-03-29 14:14:30 +02:00
tobi-wan-kenobi
da14ad3f36 [doc] Add small reminder about brightness 2020-03-29 14:13:12 +02:00
tobi-wan-kenobi
ce6fed181e [doc] Update notes 2020-03-29 13:56:43 +02:00
tobi-wan-kenobi
4f87f65f71 [doc] Add basic HOWTO write a module 2020-03-29 13:49:48 +02:00
tobi-wan-kenobi
95360fe522 [modules/brightness] Remove remaining reference to 'engine' 2020-03-28 21:17:38 +01:00
tobi-wan-kenobi
2a93a001b2 [theme] Add unit tests for WAL loading 2020-03-28 14:51:48 +01:00
tobi-wan-kenobi
18ea6d36d1 [doc] Add development priorities 2020-03-28 14:04:02 +01:00
tobi-wan-kenobi
5ade8e47f0 [core/theme] Add some unit tests 2020-03-28 14:03:50 +01:00
tobi-wan-kenobi
d5820160dc [modules/sensors2] Fix runtime errors 2020-03-28 13:44:45 +01:00
tobi-wan-kenobi
908ef67109 [core/widget] bump test coverage 2020-03-27 13:54:22 +01:00
Tobias Witek
9755a70578 [tests] Make tests pass again (configurable update interval) 2020-03-23 15:40:53 +01:00
Tobias Witek
e8288ef793 [core] Add per-module interval configuration
Allow individual modules to set different update intervals by using an
overriding 'interval' parameter.

see #574
2020-03-23 15:32:06 +01:00
Tobias Witek
0e538a6088 [modules/weather] double quotes to single quotes 2020-03-15 14:05:26 +01:00
Tobias Witek
633bbdd6ff [modules] Reimport weather module 2020-03-15 14:05:13 +01:00
Tobias Witek
9076b30325 [core/output] Make tests pass again
Using an empty configuration vs. no configuration at all to make tests
run again.
2020-03-15 14:02:48 +01:00
Tobias Witek
f2dc5f4b40 [core/output] Implement autohide
Allow output to automatically hide widgets that are *not* in any
critical mode
2020-03-15 14:01:09 +01:00
Tobias Witek
6975f179fc [modules/sensors2] Update to newest API 2020-03-15 13:53:12 +01:00