You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cava): add reload functionality and improve process management
- Implemented `_reload_cava` method to restart the cava process.
- Added callback registration for reload actions.
- Enhanced error handling during process termination and audio data reading.
- Created local directory for cava configuration files.
Copy file name to clipboardExpand all lines: docs/widgets/(Widget)-Cava.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@
26
26
|`gradient_color_3`| string | "#cba6f7" | Third gradient color in hex format |
27
27
|`hide_empty`| boolean | false | Hide widget when no audio is playing (requires `sleep_timer` to be enabled) |
28
28
|`container_padding`| object | {top: 0, left: 0, bottom: 0, right: 0} | Padding of the widget container |
29
+
|`callbacks`| dict |`{'on_left': 'do_nothing', 'on_middle': 'do_nothing', 'on_right': 'reload_cava'}`| Callbacks for mouse events on the widget. |
29
30
30
31
## Example Configuration
31
32
@@ -77,6 +78,7 @@
77
78
- **gradient_color_3**: Third gradient color in hex format.
78
79
- **hide_empty**: Hide widget when no audio is playing (requires `sleep_timer` to be enabled).
79
80
- **container_padding**: Explicitly set padding inside widget container.
81
+
- **callbacks**: A dictionary specifying the callbacks for mouse events. The keys are `on_left`, `on_middle`, and `on_right`, and the values are the names of the callback functions.
80
82
81
83
More information on this option is documented in the [example config file](https://github.com/karlstav/cava/blob/master/example_files/config)
0 commit comments