Daniel Eklöf
962252467f
plugins: only dlopen() each plugin once. dlcose() in destructor
2019-01-12 19:38:06 +01:00
Daniel Eklöf
64b77a0efc
config: dlopen() modules on-demand
...
TODO: optimizations and proper cleanup
* We currently reload the shared library for each *instance* of the
module, and we do it twice; once when verifying, and once when
instantiating.
* The shared libraries are never dlclosed()
2019-01-12 19:03:49 +01:00
Daniel Eklöf
731ab848e1
config: fix: attributes always use dash, not underscore
2019-01-12 13:56:02 +01:00
Daniel Eklöf
6f9e48698e
module/xwindow: export module info through the new module_info struct type
2019-01-12 13:03:41 +01:00
Daniel Eklöf
905f289659
module/xkb: export module info through the new module_info struct type
2019-01-12 13:01:24 +01:00
Daniel Eklöf
87640339e1
module/removables: export module info through the new module_info struct type
2019-01-12 12:59:21 +01:00
Daniel Eklöf
697e613b2e
module/network: export module info through the new module_info struct type
2019-01-12 12:56:54 +01:00
Daniel Eklöf
a16e2f5a53
module/mpd: export module info through the new module_info struct type
2019-01-12 12:52:42 +01:00
Daniel Eklöf
fb9f07dcad
module/label: export module info through the new module_info struct type
2019-01-12 12:52:36 +01:00
Daniel Eklöf
f3721d9d80
module/i3: export module info through the new module_info struct type
2019-01-12 12:12:14 +01:00
Daniel Eklöf
550d4ad534
module/clock: export module info through the new module_info struct type
2019-01-12 12:05:39 +01:00
Daniel Eklöf
e24923e7cc
module/battery: export module info through the new module_info struct type
2019-01-12 12:02:41 +01:00
Daniel Eklöf
3d36735f88
module/backlight: export module info through the new module_info struct type
2019-01-12 11:59:01 +01:00
Daniel Eklöf
e536391df6
module/alsa: export module info through the new module_info struct type
2019-01-12 11:58:57 +01:00
Daniel Eklöf
3c870f759a
config: verify: config_verify_bar() -> conf_verify_bar()
2019-01-12 11:47:01 +01:00
Daniel Eklöf
6cb2f52328
config: conf_particle_from() -> conf_to_particle()
2019-01-12 11:28:20 +01:00
Daniel Eklöf
8809cbb481
Put each module in its own subdirectory
2019-01-12 11:19:57 +01:00
Daniel Eklöf
75bdd2ad3c
config: use dashes, '-', instead of underscores, '_' in attribute names
2019-01-12 10:32:52 +01:00
Daniel Eklöf
b0705578b0
config: remove asserts
...
Since the config is now fully verified, before we start loading
anything, there's no longer any need to assert on thing.
2019-01-12 10:27:02 +01:00
Daniel Eklöf
3f578d30eb
config: bar: no need to check for NULL on required attributes
2019-01-11 22:51:01 +01:00
Daniel Eklöf
706313b1e5
config: backlight: content doesn't have to be a dictionary
...
And, particle_from_config() will take care of asserting on the correct
type anyway.
2019-01-09 21:17:41 +01:00
Daniel Eklöf
73c93bad5a
config: implicit lists now have the same default right-spacing as explicit ones
2019-01-09 18:50:26 +01:00
Daniel Eklöf
2562d94f24
config: remove extra ';'
2019-01-09 18:50:26 +01:00
Daniel Eklöf
7fc9749c28
module/clock: user can now specify the date/time format strings
2019-01-09 18:50:26 +01:00
Daniel Eklöf
f6977417e0
font: use font-config to load font
...
This allows us to a) move away from cairo's "toy" API, and b) let the
user specify font options in a single font "name" string:
Serif:size=10:weight=bold:slant=italic
This also allows us to simplify the font code significantly (except
for the fontconfig parts...); the font no longer sets itself in a
cairo surface - font users do that; the font simply returns a
cairo_scaled_font_t.
Furthermore, font_clone() has now been simplified to basically just
refcount the scaled font. I.e. there's no need to run the full
constructor and lookup and instantiate the cairo scaled font again.
2019-01-09 18:50:16 +01:00
Daniel Eklöf
2b2c5bbf4d
config: not true
2019-01-07 18:32:27 +01:00
Daniel Eklöf
aa38063e37
wip: verify configuration
...
We now verify the configuration (currently down to module level, but
not including particles) that are present are of the expected type.
2019-01-06 20:04:01 +01:00
Daniel Eklöf
0d8704737e
module/alsa: monitors volume and muted state of selected card/mixer
2019-01-02 18:07:16 +01:00
Daniel Eklöf
a9110cc936
config: allow simple lists without actually declaring a list node
...
That is, instead of writing:
content:
list:
items:
- string: ..
- string: ..
It is now possible to write:
content:
- string: ...
- string: ...
Obviously, this means it's not possible to assign spacing, margin or
on-click handlers to such a list.
2019-01-01 20:50:49 +01:00
Daniel Eklöf
e711a6f103
config: deco_from_config() return NULL if we didn't match a deco
2019-01-01 20:29:55 +01:00
Daniel Eklöf
14f9aec088
module/removables: monitors removable devices using udev
2019-01-01 20:07:50 +01:00
Daniel Eklöf
4c4f0ce7a0
module: network: monitor ethernet interfaces
...
State exposed (tag names):
* name: the interface name ("eth0" etc)
* index: the interface index, "ifindex"
* state: operational state (down, up etc)
* mac: the Ethernet hardware address
* ipv4: the *last* IPv4 address added to the interface
* ipv6: the *last* IPv6 address added to the interface
State we monitor (for changes):
* state
* ipv4 addresses
* ipv6 addresses
2018-12-30 20:40:10 +01:00
Daniel Eklöf
c795718ad7
config: i3: handle the 'spacing' attribute
2018-12-30 20:39:45 +01:00
Daniel Eklöf
b7e7ad522f
remove module subfolders
2018-12-29 22:18:08 +01:00
Daniel Eklöf
86425fbe48
config: all particles now take a 'on_click_template' argument
2018-12-29 21:23:27 +01:00
Daniel Eklöf
3135f1d36d
particle: all particles now take margin arguments
...
Ramp and map however, doesn't allow any values other than 0 (yet).
2018-12-29 20:33:38 +01:00
Daniel Eklöf
1f182b862e
particle/progress-bar: allow user to configure an on-click handler
...
Since we're typically interrested in *where* (on the progress-bar) the
user clicked, we need a way to pass the clicked position to the
handler.
Normally, the on-click handler is expanded when a particle
instantiates its exposable. At this point, we (obviously) don't have
the click position.
This is solved by expanding the handler a second time, when the bar is
clicked.
Thus, the user can use the "{where}" tag in the click handler. "where"
will be expanded to a percentage value (0-100).
2018-12-29 17:36:34 +01:00
Daniel Eklöf
88bcf425bf
particle/list: on_click handler
2018-12-29 16:15:37 +01:00
Daniel Eklöf
68606e49ed
config: clean up particle_list_from_config()
2018-12-29 16:14:09 +01:00
Daniel Eklöf
9e5dbfe27d
particle/string: constructor now takes an 'on_click_template'
2018-12-29 14:38:10 +01:00
Daniel Eklöf
6019129acc
config: clean up particle_string_from_config()
2018-12-29 14:30:09 +01:00
Daniel Eklöf
1ed0dab6ad
config: raise default battery poll interval from 30s to 60s
2018-12-28 12:41:38 +01:00
Daniel Eklöf
8d94202057
particle/progress-bar: renders a progrss-bar-like thingy
2018-12-27 14:22:05 +01:00
Daniel Eklöf
ce895ac44f
particle/empty: placeholder particle, renders nothing
...
But may have margins.
2018-12-27 14:21:33 +01:00
Daniel Eklöf
9a94c9c1f7
module/mpd: monitors MPD
2018-12-27 11:36:38 +01:00
Daniel Eklöf
a745436ee2
decoration: stack: stacks multiple decorations on top of each other
2018-12-26 15:59:48 +01:00
Daniel Eklöf
09cd27b688
decoration/underline: draws a line at the bottom of the particle
2018-12-26 15:59:16 +01:00
Daniel Eklöf
0094cc1269
config: load decorations. All particles may have one
2018-12-26 15:31:16 +01:00
Daniel Eklöf
1929099ca4
module/backlight: new module
2018-12-26 12:44:17 +01:00
Daniel Eklöf
0f5d626177
config: list has a default right-spacing of 2
2018-12-18 19:52:36 +01:00