Giter Club home page Giter Club logo

polybar-cava's Introduction

Simple CAVA (music visualization) module for polybar. Download cava.sh and put it on your config or module folder.

Screenshot
Aimated GIF

Dependencies:

  • CAVA
  • polybar
  • font that support unicode U+2581 to U+2588 (▁▂▃▄▅▆▇█). Most unicode fonts should support these characters

On your polybar config, add these lines

[module/cava]
type = custom/script
tail = true
exec = $HOME/.config/polybar/cava.sh
format = <label>
format-font = 5
label = %output%

change exec value to where you put cava.sh.

You can change the number of bar by modifying the cava config section in cava.sh.

[general]
bars = 10

You can also modify the label foreground like this

[module/cava]
label-foreground = #594751
Color changed

Usability in other status-bar application

The script cava.sh can be used in another status-bar app like Waybar. In theory, any app that can display unicode characters can use the script. cava.sh is a standalone script that does not require polybar and just outputting text (unicode). You can even try running it directly in the terminal to see the output.

Note

Example config for waybar is available in https://github.com/ray-pH/waybar-cava

polybar-cava's People

Contributors

codesteban avatar dakshg07 avatar mbpowers avatar ray-ph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

polybar-cava's Issues

Add Fonts with Characters u2581 to u2588 as a Dependency

When I first installed the cava module, I ran into issues where my font that I was using within Polybar did not contain the necessary unicode characters to display the visualizer within my bar. After a bit of trouble shooting, I realized I was missing said characters to which either switching or adding a secondary font that included these unicode characters to the Polybar config resolved my issue. Here's a snippet of warnings from polybar when run within the terminal with a font missing characters the characters used by the module:

warn: Dropping unmatched character ▃ (U+2583) in '▃▄▅▂▁▁▃▃▄▃'
warn: Dropping unmatched character ▅ (U+2585) in '▅▅▅▅▁▁▅▄▅▅'
warn: Dropping unmatched character ▇ (U+2587) in '▇▆▄▇▁▁▇▃▅▇'

In any case, updating the readme and adding a dependency for the inclusion of a font which supports these characters would be a nice addition. Perhaps adding a list or links to fonts which include these characters would also be of use to people visiting the repository. An example edits to the polybar config for replacing or backup fonts would also be useful.

font-0 = A Cool Font # desired font with or without required characters
font-1 = Backup Font # optionally added font with characters if first font doesn't already have the needed characters

Waybar support

Hej,
just wanted to let you know that this script also works flawlessly with waybar on my system, so the name of this project might be a bit missleading. Maybe you could change it or at least the README file to indicate that.

Anyway to pull config settings from the standard cava config?

I was looking to add elememts from my standard cava config like gradient, sensitivity, and frequency domains, but it seems simply copying these things from my standard config to the polybar cava config doesnt seem to work.

Is there any way this is possible to incorporate these values to the polybar cava config?

High CPU usage

it uses more cpu than just running cava from the terminal, is there a reason or a fix?

colors

any idea how can we customize colors and bar widh

any recommended font to use??

I use JetBrains Mono Nerd Font and I can't use it because a lot of error showed in my terminal
like this below
warn: Dropping unmatched character ▄ (U+2584) in '▇▇▄▃▄▄▃▄▇▇'

how to get a single output

i want to use your script in qtile bar and it needs the script to return one output whenever it is executed, i am a bash beginner how can i do that what modifications should i made

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.