Daniel Eklöf
1bcf116859
modules: handle udev_monitor_receive_device() returning NULL
...
Closes #109
2021-09-30 10:01:36 +02:00
Daniel Eklöf
1079bca3eb
Silence “variable length array bound evaluates to non-positive value 0”
2021-08-26 13:27:29 +02:00
Daniel Eklöf
ed2b8c4874
modules: implement description()
2021-06-20 21:15:24 +02:00
Daniel Eklöf
87a8054ae2
module/removable: 'ignore' is now applied to partitions too
...
This means you can now do either
ignore: [/dev/sda]
to ignore all partitions on /dev/sda, or
ignore: [/dev/sda1]
to ignore only the first partition on /dev/sda.
2020-06-21 10:24:52 +02:00
Daniel Eklöf
5d17f1eb57
module/removables: add 'ignore' configuration option
...
This is a list of devnames (e.g. /dev/sr0). Devices listed here will
be ignored.
2020-06-20 21:46:03 +02:00
Daniel Eklöf
ddd5911410
module/removables: check for removable or SD card in add_device()
2020-06-18 20:17:55 +02:00
Daniel Eklöf
0fc2a29296
module/removables: initial support for detecting SD cards at startup
...
SD cards aren't removable
2020-06-18 20:09:57 +02:00
Daniel Eklöf
86522d653d
modules: move 'content' and 'anchors' to MODULE_COMMON_ATTRS
...
All modules implement these. The only one that differs is the i3
module. It still implements them, but 'content' uses an internal
verifier function.
2020-01-24 21:08:39 +01:00
Daniel Eklöf
0550d2799d
tllist: use tllist from external git repository
2019-11-17 19:17:34 +01:00
Daniel Eklöf
0e7db5f397
module/removables: relaxed mountinfo matching criteria
...
Fixes mount detection on e.g. Artix Linux.
2019-09-27 19:31:12 +02:00
Daniel Eklöf
b6e61f9c7e
modules: use calloc() instead of malloc()
...
In cases where it makes sense, use calloc() instead of malloc():
* When allocating large objects with many members, many for which
NULL/0 is a good default value.
* Arrays etc where we explicitly initialize to NULL anyway.
2019-02-09 11:11:31 +01:00
Daniel Eklöf
ae5029826b
cmake: break out bar stuff to separate CMakeLists.txt
2019-02-07 12:06:16 +01:00
Daniel Eklöf
452c4b6015
plugins: export a const function pointer interface struct
2019-01-26 18:32:04 +01:00
Daniel Eklöf
0d591fe5a1
allow plugins to be compiled into the f00bar main binary
2019-01-14 20:57:03 +01:00
Daniel Eklöf
4a26664d8d
particles: remove config-verify.h from particle.h
2019-01-13 17:41:39 +01:00
Daniel Eklöf
bc62843c91
modules: get rid of struct module_info
...
Since this struct only contained function pointers, make all modules
export those functions directly.
The plugin manager now defines a module interface struct, and fills it
it by dlsym:ing the functions that used to be in module_info.
2019-01-13 17:09:11 +01:00
Daniel Eklöf
76d135e257
module: remove module_run_context
...
Store abort_fd directly in the module struct instead. This then allows
us to pass the module pointer as-is to the modules' run functions.
2019-01-13 15:34:59 +01:00
Daniel Eklöf
acdeff3b6e
module: remove ready_fd
...
All modules are expected to handle a call to content() after having
been instantiated.
I.e. modules *cannot* even expect run() to have started running.
2019-01-13 15:25:39 +01:00
Daniel Eklöf
a425378576
config: allow font/foreground attributes on modules too
...
Previously we allowed it on the bar, and on all particles. Now we also
allow it on all modules.
This allows us to specify a "default" font/foreground on a per-module
basis, having it applied to all the modules particles.
2019-01-13 14:24:44 +01:00
Daniel Eklöf
8dc278aaf2
config: pass a struct with inheritable values
...
For now, font and foreground color
2019-01-13 14:13:14 +01:00
Daniel Eklöf
9944a8f972
modules: don't assume module content is a dictionary
...
This is done by having each module implement a top-level verifier
function.
2019-01-13 11:54:57 +01:00
Daniel Eklöf
71515e4079
config: conf_verify_dict() now assumes attr list is NULL-terminated
2019-01-13 11:37:05 +01:00
Daniel Eklöf
ec4a47e5db
modules: rename module_info -> plugin_info
...
This is the same name used by particles.
2019-01-13 11:18:32 +01:00
Daniel Eklöf
42104db1ca
modules: move files back to a common directory (again)
2019-01-12 21:24: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
91826ff176
module/removables: handle optical media (CDROMs)
2019-01-07 18:32:09 +01:00
Daniel Eklöf
ed4716a600
module/removables: remove debug logging
2019-01-01 20:37:04 +01:00
Daniel Eklöf
a8a9ab28bd
module/removables: log warning if action is something we didn't expect
2019-01-01 20:30:27 +01:00
Daniel Eklöf
bdd760a40b
module/removables: cleanup
2019-01-01 20:18:48 +01:00
Daniel Eklöf
14f9aec088
module/removables: monitors removable devices using udev
2019-01-01 20:07:50 +01:00