1waybar-cava(5)                    User Manual                   waybar-cava(5)
2
3
4

NAME

6       waybar - cava module
7

DESCRIPTION

9       cava module for karlstav/cava project. See it on github:
10       https://github.com/karlstav/cava.
11

FILES

13       $XDG_CONFIG_HOME/waybar/config
14            Per user configuration file
15

ADDITIONAL FILES

17       libcava lives in:
18
19       1.   /usr/lib/libcava.so or /usr/lib64/libcava.so
20       2.   /usr/lib/pkgconfig/cava.pc or /usr/lib64/pkgconfig/cava.pc
21       3.   /usr/include/cava
22
23

CONFIGURATION

25       ┌────────────────┬──────────────┬─────────────┬────────────────────────┐
26Option      Typeof    Default   Description       
27       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
28cava_config     │ string       │             │ Path where cava con‐   │
29       │                │              │             │ figuration file is     │
30       │                │              │             │ placed to              │
31       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
32framerate       │ integer      │ 30          │ Frames per second. Is  │
33       │                │              │             │ used as a replacement  │
34       │                │              │             │ for interval           
35       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
36autosens        │ integer      │ 1           │ Will attempt to de‐    │
37       │                │              │             │ crease sensitivity if  │
38       │                │              │             │ the bars peak          │
39       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
40sensitivity     │ integer      │ 100         │ Manual sensitivity in  │
41       │                │              │             │ %. It's recommended to │
42       │                │              │             │ be omitted when au‐    
43       │                │              │             │ tosens = 1             │
44       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
45bars            │ integer      │ 12          │ The number of bars     │
46       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
47lower_cut‐      │ long integer │ 50          │ Lower cutoff frequen‐  │
48off_freq        │              │             │ cies for lowest bars   │
49       │                │              │             │ the bandwidth of the   │
50       │                │              │             │ visualizer             │
51       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
52higher_cut‐     │ long integer │ 10000       │ Higher cutoff frequen‐ │
53off_freq        │              │             │ cies for highest bars  │
54       │                │              │             │ the bandwidth of the   │
55       │                │              │             │ visualizer             │
56       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
57sleep_timer     │ integer      │ 5           │ Seconds with no input  │
58       │                │              │             │ before cava main       │
59       │                │              │             │ thread goes to sleep   │
60       │                │              │             │ mode                   │
61       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
62hide_on_silence │ bool         │ false       │ Hides the widget if no │
63       │                │              │             │ input (after           │
64       │                │              │             │ sleep_timer elapsed)   │
65       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
66method          │ string       │ pulse       │ Audio capturing        │
67       │                │              │             │ method. Possible meth‐ │
68       │                │              │             │ ods are: pipewire,     │
69       │                │              │             │ pulse, alsa, fifo,     │
70       │                │              │             │ sndio or shmem         │
71       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
72source          │ string       │ auto        │ See cava configuration │
73       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
74sample_rate     │ long integer │ 44100       │ See cava configuration │
75       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
76sample_bits     │ integer      │ 16          │ See cava configuration │
77       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
78stereo          │ bool         │ true        │ Visual channels        │
79       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
80reverse         │ bool         │ false       │ Displays frequencies   │
81       │                │              │             │ the other way around   │
82       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
83bar_delimiter   │ integer      │ 0           │ Each bar is separated  │
84       │                │              │             │ by a delimiter. Use    │
85       │                │              │             │ decimal value in ascii │
86       │                │              │             │ table(i.e. 59 = ";").  │
87       │                │              │             │ 0 means no delimiter   │
88       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
89monstercat      │ bool         │ false       │ Disables or enables    │
90       │                │              │             │ the so-called "Mon‐    │
91       │                │              │             │ stercat smoothing"     │
92       │                │              │             │ with or without        │
93       │                │              │             │ "waves"                │
94       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
95waves           │ bool         │ false       │ Disables or enables    │
96       │                │              │             │ the so-called "Mon‐    │
97       │                │              │             │ stercat smoothing"     │
98       │                │              │             │ with or without        │
99       │                │              │             │ "waves"                │
100       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
101noise_reduction │ double       │ 0.77        │ Range between 0 - 1.   │
102       │                │              │             │ The raw visualization  │
103       │                │              │             │ is very noisy, this    │
104       │                │              │             │ factor adjusts the in‐ │
105       │                │              │             │ tegral and gravity     │
106       │                │              │             │ filters to keep the    │
107       │                │              │             │ signal smooth. 1 -     │
108       │                │              │             │ will be very slow and  │
109       │                │              │             │ smooth, 0 - will be    │
110       │                │              │             │ fast but noisy         │
111       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
112input_delay     │ integer      │ 2           │ Sets the delay before  │
113       │                │              │             │ fetching audio source  │
114       │                │              │             │ thread start working.  │
115       │                │              │             │ On author's machine,   │
116       │                │              │             │ Waybar starts much     │
117       │                │              │             │ faster than pipewire   │
118       │                │              │             │ audio server, and      │
119       │                │              │             │ without a little delay │
120       │                │              │             │ cava module fails be‐  │
121       │                │              │             │ cause pipewire is not  │
122       │                │              │             │ ready                  │
123       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
124ascii_max_range │ integer      │ 7           │ It's impossible to set │
125       │                │              │             │ it directly. The value │
126       │                │              │             │ is dictated by the     │
127       │                │              │             │ number of icons in the │
128       │                │              │             │ array format-icons     
129       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
130data_format     │ string       │ asci        │ It's impossible to set │
131       │                │              │             │ it. Waybar sets it to  │
132       │                │              │             │ = asci for internal    │
133       │                │              │             │ needs                  │
134       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
135raw_target      │ string       │ /dev/stdout │ It's impossible to set │
136       │                │              │             │ it. Waybar sets it to  │
137       │                │              │             │ = /dev/stdout for in‐  │
138       │                │              │             │ ternal needs           │
139       └────────────────┴──────────────┴─────────────┴────────────────────────┘
140       Configuration can be provided as:
141       •   The only cava configuration file which is provided through
142           cava_config. The rest configuration can be skipped
143       •   Without cava configuration file. In such case cava should be con‐
144           figured through provided list of the configuration option
145       •   Mix. When provided both And cava configuration file And configura‐
146           tion options. In such case, waybar applies configuration file first
147           and then overrides particular options by the provided list of con‐
148           figuration options
149
150

ACTIONS

152       ┌───────┬──────────────────────────────────────────────────────────────┐
153String Action                            
154       ├───────┼──────────────────────────────────────────────────────────────┤
155mode   │ Switch main cava thread and fetch audio source thread        │
156       │       │ from/to pause/resume                                         │
157       └───────┴──────────────────────────────────────────────────────────────┘
158

DEPENDENCIES

160       •   iniparser
161       •   fftw3
162
163

SOLVING ISSUES

165       1.   On start Waybar throws an exception "error while loading shared
166           libraries: libcava.so: cannot open shared object file: No such file
167           or directory". It might happen when libcava for some reason hasn't
168           been registered in the system. sudo ldconfig should help
169       2.   Waybar is starting but cava module doesn't react to the music
170
171       1. In such cases at first need to make sure usual cava application is
172       working as well
173           2. If so, need to comment all configuration options. Uncomment
174           cava_config and provide the path to the working cava config 3. You
175           might set too huge or too small input_delay. Try to setup to 4 sec‐
176           onds, restart waybar, and check again 4 seconds past. Usual even on
177           weak machines it should be enough 4. You might accidentally switch
178           action mode to pause mode
179

RISING ISSUES

181       For clear understanding: this module is a cava API's consumer. So for
182       any bugs related to cava engine you should contact Cava up‐
183       stream(https://github.com/karlstav/cava)
184       with the one Exception. Cava upstream doesn't provide cava as a shared
185       library. For that, this module author made a fork lib‐
186       cava(https://github.com/LukashonakV/cava).
187       So the order is:
188       1.   cava upstream
189       2.   libcava upstream.
190
191       In case when cava releases new version and you're wanna get it, it
192       should be raised an issue to lib‐
193       cava(https://github.com/LukashonakV/cava) with title
194       [Bump]x.x.x where x.x.x is cava release version.
195

EXAMPLES

197           "cava": {
198                //"cava_config": "$XDG_CONFIG_HOME/cava/cava.conf",
199                "framerate": 30,
200                "autosens": 1,
201                //"sensitivity": 100,
202                "bars": 14,
203                "lower_cutoff_freq": 50,
204                "higher_cutoff_freq": 10000,
205                "method": "pulse",
206                "source": "auto",
207                "stereo": true,
208                "reverse": false,
209                "bar_delimiter": 0,
210                "monstercat": false,
211                "waves": false,
212                "noise_reduction": 0.77,
213                "input_delay": 2,
214                "format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ],
215                "actions": {
216                     "on-click-right": "mode"
217                }
218           },
219
220
221
222waybar-cava                       2023-11-05                    waybar-cava(5)
Impressum