Commit graph

617 commits

Author SHA1 Message Date
Daniel Eklöf
b579f97db7 module/xwindow: use module common constructor/destructor 2018-12-19 19:00:29 +01:00
Daniel Eklöf
f8cb3acc35 module/xkb: use module common constructor/destructor 2018-12-19 18:59:33 +01:00
Daniel Eklöf
20cb0f0de7 module/label: use module common constructor/destructor 2018-12-19 18:58:10 +01:00
Daniel Eklöf
536db672b4 module/i3: use module common constructor/destructor 2018-12-19 18:57:19 +01:00
Daniel Eklöf
16553a7216 module/battery: acquire lock when reading/writing state 2018-12-18 20:24:30 +01:00
Daniel Eklöf
d279b585db module/battery: read all data into local variables first
This minimizes the time we'll have to hold the lock (once we lock).
2018-12-18 20:23:19 +01:00
Daniel Eklöf
f253bbebd2 module/battery: we're scanning into a signed long 2018-12-18 20:22:48 +01:00
Daniel Eklöf
76995ddcd5 module/battery: use module common constructor and default destructor 2018-12-18 20:22:30 +01:00
Daniel Eklöf
72624af1fa clock: use module common constructor and destructor 2018-12-18 20:13:04 +01:00
Daniel Eklöf
edc418b22d module: provide a "common" constructor and destructor
Also, provide a lock for module to use (to ensure run() and content()
doesn't step on each other's toes).
2018-12-18 20:12:04 +01:00
Daniel Eklöf
3618b863ff module/i3: lower case initial letter in log message 2018-12-18 20:00:03 +01:00
Daniel Eklöf
0f5d626177 config: list has a default right-spacing of 2 2018-12-18 19:52:36 +01:00
Daniel Eklöf
6db41b7803 module/xkb: initialize layouts to zero
Fixes a crash when content() is called before we've initialized the
layouts.
2018-12-18 19:49:05 +01:00
Daniel Eklöf
47f5c5d655 log: dim module name / file name + line number 2018-12-18 19:46:13 +01:00
Daniel Eklöf
b3a3990347 bar: log *which* event that is unimplemented 2018-12-18 19:42:47 +01:00
Daniel Eklöf
7cc1fa9cef log.c: align module name 2018-12-18 19:41:08 +01:00
Daniel Eklöf
5e80cf2204 log: only enable debug logging if LOG_ENABLE_DBG has been set to 1 2018-12-18 19:41:05 +01:00
Daniel Eklöf
a588c78e57 particle/ramp: use log framework 2018-12-18 19:37:37 +01:00
Daniel Eklöf
1c708975eb module/xkb: use log framework 2018-12-18 19:37:30 +01:00
Daniel Eklöf
1fa5baf8b7 module/i3: use log framework 2018-12-18 19:37:22 +01:00
Daniel Eklöf
2fdd419600 module/battery: use log framework 2018-12-18 19:37:10 +01:00
Daniel Eklöf
452669d6de bar: lower case initial letter in log message 2018-12-18 19:37:03 +01:00
Daniel Eklöf
817ce49e3b bar: use log framework 2018-12-18 19:24:26 +01:00
Daniel Eklöf
8ae89820db bar: use log framework 2018-12-17 20:29:25 +01:00
Daniel Eklöf
33ffe02244 log: allow logging of format string only, no format arguments 2018-12-17 20:28:49 +01:00
Daniel Eklöf
f1f3190767 yml: don't print out final node(s) 2018-12-17 20:26:02 +01:00
Daniel Eklöf
f1cd75ecb9 xcb: use new log framework 2018-12-17 20:25:27 +01:00
Daniel Eklöf
d516ffdda0 log: initial framework for logging things 2018-12-17 20:25:18 +01:00
Daniel Eklöf
c1e71eca60 make: add global definition _DEBUG when building in debug mode 2018-12-17 20:24:47 +01:00
Daniel Eklöf
e0bd7abec6 config: battery: use name from config, instead of hardcoded "BAT0" 2018-12-17 19:59:44 +01:00
Daniel Eklöf
ef594b877b module/xkb: monitor current xkb layout 2018-12-17 19:59:29 +01:00
Daniel Eklöf
d600960d69 cmake: sort 2018-12-16 19:17:43 +01:00
Daniel Eklöf
e186c3447d module/battery: remove unused left/right spacing options 2018-12-16 19:17:14 +01:00
Daniel Eklöf
0df1df2207 config: sort includes 2018-12-16 19:16:25 +01:00
Daniel Eklöf
8f7fba72a5 module/battery: remove inferior error checks 2018-12-16 17:09:33 +01:00
Daniel Eklöf
a9681dd19c cleanup 2018-12-16 17:08:38 +01:00
Daniel Eklöf
fa3c17aa4a module/battery: use libudev to monitor for battery changes
This allows us to detect plug/unplug events immediately, instead of
having to wait for the next poll event.

Unfortunately, capacity changes do not appear to generate events :(
2018-12-16 17:04:44 +01:00
Daniel Eklöf
47b36bdd35 particle/ramp: new particle, selects one particle from a list
The ramp particle is configured with a tag name and a list of
particles.

At instantiation time, a single particle is selected from the list,
depending on the tag value and it's minimum and maximum values.

I.e. this particle acts kind of like a progress bar.
2018-12-16 16:20:45 +01:00
Daniel Eklöf
2218bd1583 tag: allow integer tags to have a minimum and maximum value 2018-12-16 15:58:40 +01:00
Daniel Eklöf
f6d0785836 config: remove debug 2018-12-16 15:58:35 +01:00
Daniel Eklöf
6a0385e294 module/battery: monitors battery state and capacity 2018-12-16 15:58:17 +01:00
Daniel Eklöf
be6429c852 particle/map: left/right margin on a map doesn't make any sense 2018-12-15 19:16:55 +01:00
Daniel Eklöf
f91d091386 config: simplify assignment of default particle when instantiating a map 2018-12-15 19:16:09 +01:00
Daniel Eklöf
e92e99c5d3 config: add 'default' config to map particle
This value specifies the particle to use when the tag value does not
match any of the values specified in the "values" dict.
2018-12-15 19:13:45 +01:00
Daniel Eklöf
40e6af2e2e yml: use tllists to represent dictionaries and lists 2018-12-15 12:52:12 +01:00
Daniel Eklöf
bda77a83f7 tllist: cast away const in tll_{r,}foreach()
This allows us to iterate const lists.
2018-12-15 11:46:34 +01:00
Daniel Eklöf
ee156c8dc7 tllist: add head/tail accessors 2018-12-15 11:46:20 +01:00
Daniel Eklöf
c67234e34f tllist: use __typeof__ instead of __typeof 2018-12-15 11:45:57 +01:00
Daniel Eklöf
b4a3a09ae4 cmake: foobar -> f00bar 2018-12-13 19:07:33 +01:00
Daniel Eklöf
db2535bd72 main: remove ifdef 2018-12-13 19:05:52 +01:00