Module: Cava: GLSL - Alexays/Waybar GitHub Wiki
The Cava GLSL frontend delegates the visualization of incoming audio data to the GPU via OpenGL.
There are some mandatory dependencies that need to be satisfied in order for Cava GLSL to be built and function properly:
- epoxy library must be installed on the system
- Vertex and fragment shaders from the original project must be used. They should be downloaded, and the file paths must be configured correctly in the Waybar Cava configuration:
- It is highly recommended to have a separate cava configuration for the Waybar Cava GLSL module and to use this as the
cava_configin the Waybar configuration. - It is common for cava configurations to be placed in the
XDG_CONFIG_HOMEdirectory, including shaders as well. Consider keeping them in the$XDG_CONFIG_HOME/cava/shadersfolder.
Key configuration options:
bars. The more values the parameter has, the more interesting the visualization becomes.methodin output section must be set tosdl_glslsdl_widthandsdl_heightmanage the size of the module. Adjust them according to your needs.- Shaders for sdl_glsl, located in $HOME/.config/cava/shaders. Example:
vertex_shader = pass_through.vert fragment_shader = spectrogram.frag - Set
continuous_renderingto 1 to enable smooth rendering; set it to 0 otherwise. It is recommended to keep it set to 1. background,foreground, andgradient_color_N(where N is a number between 1 and 8) must be defined using hex code
Example 1
- waybar module config
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#1.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
- cava config for waybar -> waybar_cava#1.conf.tar.gz
https://github.com/user-attachments/assets/52ddd326-e254-4571-b1e9-72b19e57f0c7
Example 2
- waybar module config
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#2.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
- cava config for waybar -> waybar_cava#2.conf.tar.gz
https://github.com/user-attachments/assets/ee7a7b7e-2e02-4190-92d8-b9fd72414950
Example 3
- waybar module config
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#3.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
- cava config for waybar -> waybar_cava#3.conf.tar.gz
https://github.com/user-attachments/assets/303f5444-e4a0-43ac-83b3-5471b65edf3c
Example 4
- waybar module config
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#4.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
- cava config for waybar -> waybar_cava#4.conf.tar.gz
https://github.com/user-attachments/assets/9a9d3e3a-ddc6-4f32-b386-736a7e6059b8
Example 5
- waybar module config
"cava": {
"cava_config": "$XDG_CONFIG_HOME/cava/waybar_cava#5.conf",
"input_delay": 2,
"actions": {
"on-click-right": "mode"
}
},
- cava config for waybar -> waybar_cava#5.conf.tar.gz
https://github.com/user-attachments/assets/ef4fcddc-47a6-4651-87c4-96907eb99f5c