Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

cava shows ";;"

Open raffaem opened this issue 1 year ago • 12 comments

I compiled waybar from git using the instructions here.

In my config I have:

  "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": "pipewire",
        "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"
                   }
    }

But the cava module is shown as ";;":

Logs:

❯ ./build/waybar
[2024-01-04 08:48:10.903] [info] Using configuration file /home/raffaele/.config/waybar/config
[2024-01-04 08:48:10.905] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object
 at path /org/freedesktop/portal/desktop
[2024-01-04 08:48:10.905] [info] Using CSS file /home/raffaele/.config/waybar/style.css
[2024-01-04 08:48:11.450] [warning] Mapping is not an object
[2024-01-04 08:48:11.450] [info] Hyprland IPC starting
[2024-01-04 08:48:11.452] [warning] Waybar has been built without rfkill support.
[2024-01-04 08:48:11.592] [info] Bar configured (width: 1920, height: 32) for output: eDP-1

** (waybar:114759): WARNING **: 08:48:11.595: Status Notifier Item with bus name ':1.32' and object path '/org/ayatana/NotificationItem/nm_applet' is already registered

(waybar:114759): Gtk-CRITICAL **: 08:48:11.609: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(waybar:114759): Gtk-CRITICAL **: 08:48:11.609: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(waybar:114759): Gtk-CRITICAL **: 08:48:11.609: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(waybar:114759): Gtk-CRITICAL **: 08:48:11.609: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
Call failed: Connection timed out
Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached

I've also tried build and installed subprojects/cava-0.9.1/. Same results.

Not a duplicate of #2781 as that seems to be cause by waybar compiled without the cava module altogether.

I've also tried the following config:

  "cava": {
        "cava_config": "/home/raffaele/.config/cava/config"
  }

raffaem avatar Jan 04 '24 08:01 raffaem

what do you name the cava module to get it to show up at all? I name it cava and it still shows up as unknown. And yes, I have built the package with Dcava=enabled.

Zenith-the-realest avatar Jan 04 '24 13:01 Zenith-the-realest

Hi @raffaem.

  1. make sure you're using correct "method": "pipewire",
  2. try to run cava as an application and sure it works correct. Please see an example
  3. Try to increase "input_delay": 2, to for example 4,6,8 seconds and wait this delay before start playing. It might possible waybar starts much earlier before pipewire server is ready. (On author's second machine this parameter is set to 4 seconds)

https://github.com/Alexays/Waybar/assets/23121044/61c9a9cd-213e-4676-b6a9-64cbd095a5b5

LukashonakV avatar Jan 04 '24 14:01 LukashonakV

THis is my newconfig, same result:

  "cava": {
        "cava_config": "/home/raffaele/.config/cava/config",
        "format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ],
        "bar_delimiter": 0,
        "method": "pipewire",
        "input_delay": 8
  }

The CLI programcava works, although it's the distribution installed one while I believe waybar is linkedwith the libcava bundled with the sources.

raffaem avatar Jan 04 '24 20:01 raffaem

It might possible waybar starts much earlier before pipewire server is ready

This is irrelevant if I restart the waybar, right?

raffaem avatar Jan 04 '24 20:01 raffaem

You should restart waybar once delay is changed

LukashonakV avatar Jan 04 '24 20:01 LukashonakV

That's what I'm doing

raffaem avatar Jan 04 '24 20:01 raffaem

It might possible waybar starts much earlier before pipewire server is ready

This is irrelevant if I restart the waybar, right?

Should be irrelevant. But in your logs one thing looks strange [2024-01-04 08:48:10.905] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop If I were you, I'd start to check why dbus throws this

LukashonakV avatar Jan 04 '24 20:01 LukashonakV

I think xdg-desktop-portal-hyprland doesn't support org.freedesktop.portal.Settings

raffaem avatar Jan 04 '24 20:01 raffaem

I had a few issues with the cava module before, particularly with the install locations, but I'll list the steps and config options that I followed to get a working cava module if it helps.

To install:

  1. git clone https://github.com/Alexays/Waybar
  2. cd Waybar
  3. meson build && meson configure build -Dprefix="/usr"
  4. sudo meson install -C build

My cava config options:

"cava": {
    "framerate": 120,
    "autosens": 1,
    "bars": 12,
    "method": "pipewire",
    "source": "auto",
    "bar_delimiter": 0,
    "input_delay": 2,
    "sleep_timer": 2,
    "hide_on_silence": true,
    "format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ]
},

smsteward avatar Jan 04 '24 23:01 smsteward

Still nothing.

We don't know what's failing because there are no logs related to cava.

raffaem avatar Jan 05 '24 08:01 raffaem

I had this problem initially due to it not being clear enough that format-icons is a required attribute. Though if ;; is still showing for you despite bar_delimiter defined as ASCII null, that points to the settings not taking effect in the first place.

I was able to get your last snippet, barring the cava_config file, to work on my system (Hyprland following NixOS unstable) with the result:

image

For reference, this is what it should look like with only format-icons defined:

image

Should be irrelevant. But in your logs one thing looks strange [2024-01-04 08:48:10.905] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop If I were you, I'd start to check why dbus throws this

In regards to this warning, it is indeed due to the Hyprland portal not offering that dbus path. I don't have this warning on my system as I add xdg-desktop-portal-gtk as an extra portal, which does provide it. I noticed no effect either way while testing with it disabled.

Myned avatar Jan 10 '24 02:01 Myned

Actually cava upstream has brought new changes related to the pipewire. I have to take some pause to merge them to the cava library and include it into the waybar

LukashonakV avatar Jan 10 '24 21:01 LukashonakV

Hi there. Finally I have merged all cava upstream incoming PR into cava library. @raffaem can you please check this #2925 It might help you. There were some improvements relates to the Pipe wire and Jack audio input interfaces

LukashonakV avatar Feb 20 '24 07:02 LukashonakV