waybar-cava(5)
π waybar-cava β the manual page, but make it cute π
okay bestie, gather round π«Ά this is waybar-cava(5), from the User Manual, and it's literally the glow-up your status bar has been waiting for. it's giving audio visualiser but make it fashion. β¨
π NAME π
waybar β the cava module π
π¦ DESCRIPTION π¦
okay so. this is the cava module, made for the karlstav/cava project. no cap, that's the whole vibe. π΅
if you wanna go look at it on github (and honestly, you should, it's iconic):
https://github.com/karlstav/cava
go on, peek. i'll wait. π
π FILES π
$XDG_CONFIG_HOME/waybar/configβ the per user configuration file π«Ά
like, this is your config, bestie. your personal file. your main character document. π
β¨ ADDITIONAL FILES β¨
so libcava lives in these places β it's lowkey just vibing in your filesystem, here's exactly where to find it: π
/usr/lib/libcava.soor/usr/lib64/libcava.so/usr/lib/pkgconfig/cava.pcor/usr/lib64/pkgconfig/cava.pc/usr/include/cava
part 1 done, bestie β more coming, don't go anywhere π§π
β¨ CONFIGURATION β¨
okay bestie, this is the config tea β β every option, its type, its default, and what it actually does. no skips, no cap. if you're following along from the earlier sections, we're picking up right here. π
cava_configβ type:string, default: (empty) β the path where the cava configuration file is placed to. πframerateβ type:integer, default:30β frames per second. it's used as a replacement forinterval. β¨autosensβ type:integer, default:1β will attempt to decrease sensitivity if the bars peak. π¦sensitivityβ type:integer, default:100β manual sensitivity in %. it's recommended to be omitted whenautosens = 1. πΈbarsβ type:integer, default:12β the number of bars. πlower_cutoff_freqβ type:long integer, default:50β lower cutoff frequencies for lowest bars the bandwidth of the visualizer. iykyk πhigher_cutoff_freqβ type:long integer, default:10000β higher cutoff frequencies for highest bars the bandwidth of the visualizer. πsleep_timerβ type:integer, default:5β seconds with no input before cava main thread goes to sleep mode. π΄hide_on_silenceβ type:bool, default:falseβ hides the widget if no input (aftersleep_timerelapsed). πmethodβ type:string, default:pulseβ audio capturing method. possible methods are:pipewire,pulse,alsa,fifo,sndioorshmem. π₯sourceβ type:string, default:autoβ see cava configuration. πsample_rateβ type:long integer, default:44100β see cava configuration. βsample_bitsβ type:integer, default:16β see cava configuration. πstereoβ type:bool, default:trueβ visual channels. π§reverseβ type:bool, default:falseβ displays frequencies the other way around. πbar_delimiterβ type:integer, default:0β each bar is separated by a delimiter. use decimal value in ascii table (i.e.59 = ";").0means no delimiter. πmonstercatβ type:bool, default:falseβ disables or enables the so-called "Monstercat smoothing" with or without "waves". π±wavesβ type:bool, default:falseβ disables or enables the so-called "Monstercat smoothing" with or without "waves". πnoise_reductionβ type:double, default:0.77β range between0-1. the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth.1- will be very slow and smooth,0- will be fast but noisy. π§input_delayβ integer, defaults to2. This sets the delay before the fetch-audio-source thread starts doing its thing. Here's the tea: on the author's machine, Waybar boots up way faster than the pipewire audio server does, and without a lil' delay the cava module just πs because pipewire isn't ready yet.ascii_max_rangeβ integer, defaults to7. You literally cannot set this one directly, bestie. The value is dictated by how many icons are chilling in theformat-iconsarray. It's giving "the icons decide your fate" β¨data_formatβ string, defaults toasci. Also impossible to set. Waybar hard-sets it to= ascifor its own internal needs. Not your business, not your problem πraw_targetβ string, defaults to/dev/stdout. Same situation: you can't set it. Waybar sets it to= /dev/stdoutfor internal needs. Periodt.
Configuration can be provided as:
- The only cava configuration file, handed over via
cava_config. Everything else in the config can just be skipped, no thoughts head empty π«Ά - Without a cava configuration file. In that case cava has to be configured through the provided list of configuration options.
- Mix. When you provide both a cava configuration file and configuration options. In that case, Waybar applies the configuration file first, and then overrides the particular options with the provided list of configuration options. Layers, bestie. Onion energy π§
π ACTIONS π
| String | Action |
|---|---|
mode | Switch main cava thread and fetch audio source thread from/to pause/resume |
So basically: the one action string you get is mode, and it flips the main cava thread and the fetch-audio-source thread back and forth between pause and resume. Toggle queen π
β¨ DEPENDENCIES β¨
iniparserfftw3
Those two are the whole entourage. No extras, no hangers-on π
π οΈ SOLVING ISSUES π οΈ
- On start, Waybar throws an exception that says:
error while loading shared libraries: libcava.so: cannot open shared object file: No such file or directory
This can happen when libcava hasn't been registered in the system for some reason. sudo ldconfig should help. Slay, fixed π₯
- Waybar is starting, but the cava module doesn't react to the music. Rude. In such cases:
- First, you need to make sure the usual cava application is working as well.
- If it is, you need to comment out all configuration options. Uncomment
cava_configand provide the path to the working cava config. - You might have set too huge or too small an
input_delay. Try setting it up to 4 seconds, restart waybar, and check again 4 seconds past. Usually, even on weak machines, it should be enough. - You might have accidentally switched the action mode to pause mode. π Been there.
π¨ RISING ISSUES π¨
For clear understanding: this module is a cava API's consumer. So for any bugs related to the cava engine, you should contact the Cava upstream (https://github.com/karlstav/cava) β with one Exception. Cava upstream doesn't provide cava as a shared library. For that, this module author made a fork: libcava (https://github.com/LukashonakV/cava).
So the order is:
- cava upstream
libcavaupstream.
In case cava releases a new version and you're wanna get it, you should raise an issue to libcava (https://github.com/LukashonakV/cava) with the title [Bump]x.x.x where x.x.x is the cava release version. Title format matters, bestie, don't freestyle it π
π EXAMPLES π
"cava": {
//"cava_config": "$XDG_CONFIG_HOME/cava/cava.conf",
"framerate": 30,
"autosens": 1,
//"sensitivity": 100,
"bars": 14,
"lower_cutoff_freq": 50,
"higher_cutoff_freq": 10000,
"method": "pulse",
"source": "auto",
"stereo": true,
"reverse": false,
"bar_delimiter": 0,
"monstercat": false,
"waves": false,
"noise_reduction": 0.77,
"input_delay": 2,
"format-icons" : ["β", "β", "β", "β", "β
", "β", "β", "β" ],
"actions": {
"on-click-right": "mode"
}
},
And that's a wrap on the whole page, babes π that last footer line was waybar-cava β the waybar-cava manual page, section 5 β dated 2024-04-01. Go make your bars bounce, you absolute icon πβ¨
π¦ where this page comes from
- ubuntu noble: waybar 0.9.24-1build3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms