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          │ rames 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       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
62method          │ string       │ pulse       │ Audio capturing        │
63       │                │              │             │ method. Possible meth‐ │
64       │                │              │             │ ods are: pipewire,     │
65       │                │              │             │ pulse, alsa, fifo,     │
66       │                │              │             │ sndio or shmem         │
67       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
68source          │ string       │ auto        │ See cava configuration │
69       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
70sample_rate     │ long integer │ 44100       │ See cava configuration │
71       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
72sample_bits     │ integer      │ 16          │ See cava configuration │
73       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
74stereo          │ bool         │ true        │ Visual channels        │
75       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
76reverse         │ bool         │ false       │ Displays frequencies   │
77       │                │              │             │ the other way around   │
78       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
79bar_delimiter   │ integer      │ 0           │ Each bar is separated  │
80       │                │              │             │ by a delimiter. Use    │
81       │                │              │             │ decimal value in ascii │
82       │                │              │             │ table(i.e. 59 = ";").  │
83       │                │              │             │ 0 means no delimiter   │
84       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
85monstercat      │ bool         │ false       │ Disables or enables    │
86       │                │              │             │ the so-called "Mon‐    │
87       │                │              │             │ stercat smoothing"     │
88       │                │              │             │ with of without        │
89       │                │              │             │ "waves"                │
90       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
91waves           │ bool         │ false       │ Disables or enables    │
92       │                │              │             │ the so-called "Mon‐    │
93       │                │              │             │ stercat smoothing"     │
94       │                │              │             │ with of without        │
95       │                │              │             │ "waves"                │
96       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
97noise_reduction │ double       │ 0.77        │ Range between 0 - 1.   │
98       │                │              │             │ The raw visualization  │
99       │                │              │             │ is very noisy, this    │
100       │                │              │             │ factor adjust the in‐  │
101       │                │              │             │ tegral and gravity     │
102       │                │              │             │ filters to keep the    │
103       │                │              │             │ signal smooth. 1 -     │
104       │                │              │             │ will be very slow and  │
105       │                │              │             │ smooth, 0 - will be    │
106       │                │              │             │ fast but noisy         │
107       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
108input_delay     │ integer      │ 2           │ Sets the delay before  │
109       │                │              │             │ fetching audio source  │
110       │                │              │             │ thread start working.  │
111       │                │              │             │ On author machine Way‐ │
112       │                │              │             │ bar starts much faster │
113       │                │              │             │ then pipewire audio    │
114       │                │              │             │ server, and without a  │
115       │                │              │             │ little delay cava mod‐ │
116       │                │              │             │ ule fails due to       │
117       │                │              │             │ pipewire is not ready  │
118       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
119ascii_max_range │ integer      │ 7           │ It's impossible to set │
120       │                │              │             │ it directly. The value │
121       │                │              │             │ is dictated by the     │
122       │                │              │             │ number of icons in the │
123       │                │              │             │ array format-icons     
124       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
125data_format     │ string       │ asci        │ It's impossible to set │
126       │                │              │             │ it. Waybar sets it to  │
127       │                │              │             │ = asci for internal    │
128       │                │              │             │ needs                  │
129       ├────────────────┼──────────────┼─────────────┼────────────────────────┤
130raw_target      │ string       │ /dev/stdout │ It's impossible to set │
131       │                │              │             │ it. Waybar sets it to  │
132       │                │              │             │ = /dev/stdout for in‐  │
133       │                │              │             │ ternal needs           │
134       └────────────────┴──────────────┴─────────────┴────────────────────────┘
135       Configuration can be provided as:
136       •   The only cava configuration file which is provided through
137           cava_config. The rest configuration can be skipped
138       •   Without cava configuration file. In such case cava should be con‐
139           figured through provided list of the configuration option
140       •   Mix. When provided both And cava configuration file And configura‐
141           tion options. In such case waybar applies configuration file first
142           then overrides particular options by the provided list of configu‐
143           ration options
144
145

ACTIONS

147       ┌───────┬──────────────────────────────────────────────────────────────┐
148String Action                            
149       ├───────┼──────────────────────────────────────────────────────────────┤
150mode   │ Switch main cava thread and fetching audio source thread     │
151       │       │ from/to pause/resume                                         │
152       └───────┴──────────────────────────────────────────────────────────────┘
153

DEPENDENCIES

155       •   iniparser
156       •   fftw3
157
158

SOLVING ISSUES

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

RISING ISSUES

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

EXAMPLES

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