Cache signal value during module construction to avoid accessing JSON config
in signal handler context. This prevents crashes when signal field is missing
or not an integer type.
- Custom module: Cache signal_ value in constructor
- Image module: Cache signal_ value in constructor
- Both modules: Use cached value in refresh() method
Co-authored-by: Alexays <13947260+Alexays@users.noreply.github.com>
data_format was changed from always "ascii" to user-configurable,
but without a default. This caused cava to use "binary", calculating
height as 65535 instead of ascii_range, making bars always peak.
Allow selecting a hwmon device for the temperature module by its
name instead of a fixed hwmon path.
This avoids fragile configurations that break when new hwmon
devices are added and the kernel changes hwmon ordering.
The hwmon-name option is mutually exclusive with hwmon-path and
hwmon-path-abs to prevent ambiguous configurations.
Most modules support config fields like "format-<status>-<state>", so
the user can, for example, set a different format for batter when
unplugged _and_ under a given level. Wifi didn't support this. Change
the module to support format state based on signal strength.
It makes it find the first node that has adevice.id linked to the
default output if the default output doesn't have it (i.e. it is a
virtual output).
Useful if you want to control (and see) the volume of the actual output
and not the effect sink.
May need some polishing and/or style fixing, but it works.
The monitor signal handlers (signal_monitor_added, signal_monitor_removed)
were never disconnected during SIGUSR2 reload. Each reload accumulated
additional handlers, causing multiple layer surfaces to be created when
monitors were hotplugged.
This fix:
- Stores signal connections as class members
- Disconnects them before reconnecting in bindInterfaces()
- Clears stale outputs_ on reload
Added option in the `dwl/tags` to theme empty tags (i.e. tags without any clients) in `style.css` using
`#tags button.empty`.
Signed-off-by: ospafford <ospafford@gmail.com>