Skip to content

TheWisker/Cavasik

Cavasik

Audio visualizer based on CAVA

Index

Description []

This is an audio visualizer based on CAVA with extended capabilities.

Features []

The visualizer features:

  • Five normal drawing modes!
  • Two circle drawing modes!
  • Five mirror drawing modes!
  • Four drawing directions!
  • Customizable LibAdwaita interface!
  • Set a single color or up to a 10 color linear gradient for background and foreground!
  • Select different foreground colors for the mirrored images in mirror mode!
  • Set up a color animation that changes the colors gradually in a loop!
  • Configure smoothing, noise reduction and a few other CAVA settings!
  • Change background and foreground colors through a DBus interface!
  • Change background and foreground colors on startup by reading them from a file!

Screenshots []

Waves mode

Levels mode

Particles mode

Spine mode

Bars mode

Waves mode + Circle shape

Bars mode + Circle shape

Normal mirror + Waves mode

Normal mirror + Bars mode

Normal mirror + Levels mode

Normal mirror + Waves mode + No Fill

Inverted mirror + Waves mode

Inverted mirror + Bars mode

Inverted mirror + Levels mode

Inverted mirror + Waves mode + No Fill

Overlapping mirror + Waves mode

Overlapping mirror + Bars mode

Overlapping+Normal mirror + Waves mode

Overlapping+Normal mirror + Bars mode

Overlapping+Reverse mirror + Waves mode

Overlapping+Reverse mirror + Bars mode

Direction top-bottom + Overlapping mirror + Waves mode + No Fill

Videos []

Video-0.mp4
Video-1.mp4
Video-2.mp4
Video-3.mp4
Video-4.mp4
Video-5.mp4
Video-6.mp4
Video-7.mp4
Video-8.mp4

Installation []

Flathub

You can install the Cavasik app from Flathub in its app page.

  • For information on how to setup a flatpak on any distro read this.

Snap Store

You can install the Cavasik app from Snap Store in its app page.

  • For information on how to setup a snap on any distro read this.

Arch Linux

You can install Cavasik from the AUR repository in its app page:

  • For information on how to install an AUR package read this wiki.

Manually

To manually install Cavasik start by downloading a release. Then, uncompress the downloaded release into a resulting folder. Make sure you have all the dependencies needed. Then, proceed to run the following commands:

#BUILD
arch-meson Cavasik build
meson compile -C build

#TEST
meson test -C build --print-errorlog

#INSTALL
meson install -C build
install -Dm644 Cavasik/LICENSE -t "/usr/share/licenses/cavasik"

Usage []

Simply start the application on your PC and enjoy. It will react to any sound your system makes, so play some music or something!

Configuration

The configuration is purely graphical. To configure Cavasik, simply press <Primary+P>, usually <Ctrl+P>, having it focused or click on the menu button located on the top-left corner of the window and then Preferences. Everything is documented there, I believe its pretty straightforward but if you don't understand something or believe it could be explained better open an Issue or a PR!

Startup Colors

To have the colors of Cavasik change on startup, simply enable this option in the settings and specify a file to get the colors from. The file must contain only one color per line in RGB format, like, for example:

0,0,0
160,160,160
255,255,255

Changing the colors overwrites default profile.

⚠️ Snap Package Warning: When using the Snap version of Cavasik, the app cannot access hidden files in your home directory (like ~/.cache/wal/colors.rgb) due to Snap confinement.

To enable theme coloring at startup, make sure a copy or symbolic link of your color file exists under:

  • $XDG_CONFIG_HOME/cavasik or ~/.config/cavasik

Example:

mkdir -p ~/.config/cavasik
ln -s ~/.cache/wal/colors.rgb ~/.config/cavasik/colors.rgb

DBus Interface

Cavasik also provides a DBus Interface to change the colors like we can do on startup but on demand. This interface allows us to set the foreground or background colors by sending a signal to Cavasik's DBus interface and specifying a file to get the colors from.

The color file must have the same structure that the startup colors one.

The interface has the following structure:

<interface name='io.github.TheWisker.Cavasik'>
    <method name='set_fg_colors'>
        <arg type='s' name='path' direction='in'/>
        <arg type='b' name='state' direction='out'/>
    </method>
    <method name='set_bg_colors'>
        <arg type='s' name='path' direction='in'/>
        <arg type='b' name='state' direction='out'/>
    </method>
</interface>

So, we can use this in a script to dynamically and on demand set Cavasik's colors, like:

# Must be called under same user that started Cavasik
dbus-send \
--session \
--type=method_call \
--dest="io.github.TheWisker.Cavasik" \
"/io/github/TheWisker/Cavasik" "io.github.TheWisker.Cavasik.set_fg_colors" \ # Use 'set_bg_colors' for background colors
string:"${HOME}/.cache/wal/colors.rgb"

Changing the colors overwrites default profile.

Command line

Cavasik also features a simple command line:

Usage: cavasik [OPTIONS]

Help with OPTIONS:

--version: Prints the current version.

--set-fg [FILE]: Sets the foreground to the colors read from the file.

--set-bg [FILE]: Sets the background to the colors read from the file.

--help: Prints this help.

The color file must have the same structure that the startup colors one.

Changing the colors overwrites default profile.

Pywal Integration

You can easily make Cavasik follow your Pywal colorscheme. Simply enable startup colors, as to make the colors change on startup, and set the startup colors file to be ~/.cache/wal/colors.rgb, for example. Now, you need to add a Pywal template file that will be used to generate the colorscheme in a way Cavasik understands and using your desired colors. For this, simply create a file under ~/.config/wal/templates with the same name as the one you set under ~/.cache/wal/, for example, colors.rgb. Then, write the colors into the file in RGB format, for example:

{color1.rgb}
{color2.rgb}
{color3.rgb}

These will be substituted when Pywal runs. You can use more or less colors and any of {color0} to {color15} and {background} or {foreground}, ending with .rgb. Now, if you run Pywal before starting Cavasik, it will pick up Pywal's colors. If you also intend to run Pywal when Cavasik is running and don't want to have to restart it, you need to make use of the DBus Interface. Simply create a bash script and add inside it:

# Must be called under same user that started Cavasik
dbus-send \
--session \
--type=method_call \
--dest="io.github.TheWisker.Cavasik" \
"/io/github/TheWisker/Cavasik" "io.github.TheWisker.Cavasik.set_fg_colors" \
string:"${HOME}/.cache/wal/colors.rgb" # Or whatever you called it

Don't forget to make it executable: chmod +x /path/to/script

Then, simply when running Pywal use its script execute option, or execute it manually after Pywal:

wal -o /path/to/script OTHER_ARGS

Or

wal OTHER_ARGS
/path/to/script

I recommend you save the script under /.config/wal/scripts.

Now you have set up Cavasik to use Pywal's colors!

Dependencies []

Buildtime

The Cavasik application has the following buildtime dependencies:

Runtime

The Cavasik application has the following runtime dependencies:

Contributions []

First and foremost, all contributions are welcome! The steps involved when making a contribution are explained in the CONTRIBUTING.md file. We look forward to your contributions!

  • The contributors list is located here.

Translations []

Secondly, all translations are also welcome! The steps involved when making a translation are explained in the CONTRIBUTING.md file. More specific steps can be found in the CONTRIBUTING.md file in the /lang folder. We look forward to your translations!

  • The credits of the translators are located here.

Metrics []

License []

Code of Conduct []

This project follows the Contributor Covenant Code of Conduct.

Credits []

Author Forked From
TheWisker Fsobolev