|
| 1 | +#Cava Widget Configuration |
| 2 | + |
| 3 | +>NOTE: This widget requires the`cava` version >= 0.10.4 to be installed on your system. You can install it using winget`winget install karlstav.cava` or from the[official repository](https://github.com/karlstav/cava/releases). Cava need to be accessible in the system path. YASB will create temporary configuration files for cava in the`%temp%` directory. |
| 4 | +
|
| 5 | +| Option| Type| Default| Description| |
| 6 | +|--------|------|---------|-------------| |
| 7 | +|`bar_height`| integer| 20| The height of bars in pixels| |
| 8 | +|`bars_number`| integer| 10| The number of bars (0-512). 0 sets it to auto| |
| 9 | +|`output_bit_format`| string| "16bit"| Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530)| |
| 10 | +|`bar_spacing`| integer| 1| Space between bars| |
| 11 | +|`bar_width`| integer| 3| Bars' width in number of characters| |
| 12 | +|`sleep_timer`| integer| 0| Seconds with no input before cava goes to sleep mode. 0 to disable| |
| 13 | +|`sensitivity`| integer| 100| Manual sensitivity in %. 200 means double height| |
| 14 | +|`lower_cutoff_freq`| integer| 50| Lower cutoff frequencies for lowest bars| |
| 15 | +|`higher_cutoff_freq`| integer| 10000| Higher cutoff frequencies for highest bars| |
| 16 | +|`framerate`| integer| 60| Accepts only non-negative values| |
| 17 | +|`noise_reduction`| float| 0.77| Noise reduction, 0-100. Higher = smoother but slower, lower = faster but noisier| |
| 18 | +|`channels`| string| "stereo"| Visual channels. Can be 'stereo' or 'mono'| |
| 19 | +|`mono_option`| string| "average"| Set mono to take input from 'left', 'right' or 'average'| |
| 20 | +|`reverse`| integer| 0| Set to 1 to display frequencies the other way around| |
| 21 | +|`foreground`| string| "#ffffff"| Foreground color in hex format| |
| 22 | +|`gradient`| integer| 1| Gradient mode, 1 = on, 0 = off| |
| 23 | +|`gradient_color_1`| string| "#74c7ec"| First gradient color in hex format| |
| 24 | +|`gradient_color_2`| string| "#89b4fa"| Second gradient color in hex format| |
| 25 | +|`gradient_color_3`| string| "#cba6f7"| Third gradient color in hex format| |
| 26 | +|`hide_empty`| boolean| false| Hide widget when no audio is playing (requires`sleep_timer` to be enabled)| |
| 27 | +|`container_padding`| object| {top: 0, left: 0, bottom: 0, right: 0}| Padding of the widget container| |
| 28 | + |
| 29 | +##Example Configuration |
| 30 | + |
| 31 | +```yaml |
| 32 | +cava: |
| 33 | +type:"yasb.cava.CavaWidget" |
| 34 | +options: |
| 35 | +bar_height:12 |
| 36 | +gradient:1 |
| 37 | +reverse:0 |
| 38 | +foreground:"#89b4fa" |
| 39 | +gradient_color_1:'#74c7ec' |
| 40 | +gradient_color_2:'#89b4fa' |
| 41 | +gradient_color_3:'#cba6f7' |
| 42 | +bars_number:8 |
| 43 | +bar_spacing:2 |
| 44 | +bar_width:4 |
| 45 | +sleep_timer:2 |
| 46 | +hide_empty:true |
| 47 | +container_padding: |
| 48 | +top:0 |
| 49 | +left:8 |
| 50 | +bottom:0 |
| 51 | +right:8 |
| 52 | +``` |
| 53 | +
|
| 54 | +## Description of Options |
| 55 | +
|
| 56 | +- **bar_height**: The height of bars in pixels. |
| 57 | +- **bars_number**: The number of bars to display. Can be between 0 and 512. 0 sets it to auto. |
| 58 | +- **output_bit_format**: Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530). |
| 59 | +- **bar_spacing**: Space between bars in number of characters. |
| 60 | +- **bar_width**: Bars' width in number of characters. |
| 61 | +- **sleep_timer**: Seconds with no input before cava goes to sleep mode. 0 to disable. |
| 62 | +- **sensitivity**: Manual sensitivity in %. 200 means double height. |
| 63 | +- **lower_cutoff_freq**: Lower cutoff frequencies for lowest bars. |
| 64 | +- **higher_cutoff_freq**: Higher cutoff frequencies for highest bars. |
| 65 | +- **framerate**: Accepts only non-negative values. |
| 66 | +- **noise_reduction**: Noise reduction, 0-100. Higher = smoother but slower, lower = faster but noisier. |
| 67 | +- **channels**: Visual channels. Can be 'stereo' or 'mono'. |
| 68 | +- **mono_option**: Set mono to take input from 'left', 'right' or 'average'. |
| 69 | +- **reverse**: Set to 1 to display frequencies the other way around. |
| 70 | +- **foreground**: Foreground color in hex format. |
| 71 | +- **gradient**: Gradient mode, 1 = on, 0 = off. |
| 72 | +- **gradient_color_1**: First gradient color in hex format. |
| 73 | +- **gradient_color_2**: Second gradient color in hex format. |
| 74 | +- **gradient_color_3**: Third gradient color in hex format. |
| 75 | +- **hide_empty**: Hide widget when no audio is playing (requires`sleep_timer` to be enabled). |
| 76 | +- **container_padding**: Explicitly set padding inside widget container. |
| 77 | + |
| 78 | +More information on this option is documented in the [example config file](https://github.com/karlstav/cava/blob/master/example_files/config) |
| 79 | + |
| 80 | +## Style |
| 81 | +```css |
| 82 | +.cava-widget { |
| 83 | + padding: 0; |
| 84 | + margin: 0; |
| 85 | +} |
| 86 | +.cava-widget .widget-container {} |
| 87 | +``` |