Closed DeeeeLAN closed 1 year ago
Very odd. That shouldn't be possible!
Did you change any settings for the widget?
Nope, literally just updated the package, added the default widget and dependency, and checked the logs. I have since played music and nothing popped up.
By "dependency" I assume you mean you've installed cava
? It sounds like that command isn't running properly so can you just try running cava
in a terminal and see if it works?
Yes cava, it looked like it ran fine yesterday, although I only ran it for a couple seconds without any music.
Hmm. Can you try making it smaller e.g. width=50, bars=4
?
Changing the width scaled the error message to match:
width=100 -> Got a 8000 bytes buffer, needs at least 9200.
width=50 -> Got a 4000 bytes buffer, needs at least 5200.
width=25 -> Got a 2000 bytes buffer, needs at least 3200.
Changing bar number didn't make a difference.
Just checked and Cava runs fine in the terminal.
Hmm. So we're always 1200 bytes off. I've no idea why that number isn't changing.
However, looking at the numbers, I think you're getting the right size: 100 (width) x 20 (height - default) x 4 (ARGB) = 8000 bytes. So why does Cairo want you to have more on your system?
I think I know where the bug is: Have you got a widget decoration with the visualiser?
If I'm right #124 should fix this.
Yep, I have a powerline decoration on it.
Great. Can you test the PR and let me know if that works? Pretty sure it will!
Actually, I've just tested this myself. I can recreate the issue and the PR does fix it. Will get it merged soon.
I don't get an error anymore, but I also don't have the widget showing up at all either. Nothing in the logs mentioning it.
Output of ps aux | grep cava
and qtile cmd-obj -o widget visualiser -f eval -a "self._procs_started"
?
hmm
> ps aux | grep cava
dillan 47096 0.6 0.0 232420 10904 tty1 Sl 13:42 0:01 /usr/bin/cava -p /tmp/tmp5v_qpf31
dillan 47098 0.4 0.0 42496 27512 tty1 S 13:42 0:00 python /usr/lib/python3.10/site-packages/qtile_extras/resources/visualiser/cava_draw.py --width 100 --height 20 --bars 8 --spacing 2 --pipe /tmp/cava.pipe --background #ffffff
dillan 47866 0.0 0.0 6564 2484 pts/1 S+ 13:45 0:00 grep cava
> qtile cmd-obj -o widget visualiser -f eval -a "self._procs_started"
(True, 'True')
OK. So the processes are all running. What about qtile cmd-obj -o widget visualiser -f info
?
> qtile cmd-obj -o widget visualiser -f info
{'height': 75,
'length': 115,
'name': 'visualiser',
'offset': 3845,
'width': 115}
Here is my visualizer config:
visualizer_config = dict(
hide=False,
background='#BC83E37F',
bars=8,
width=100
)
Duh, sorry I got it working. I had only added it to my second screen which is disabled. Thanks for the help.
Interesting. If the screen is disabled. Why is the widget running?
Fake screen? Or because I create the widget outside of the screen then pass it into the widget array for the screen?
The processes would only start when the widget is configured which, in turn, happens when the bar is configured. That should only happen if the bar is on an active screen.
Odd. I assume it will be easy to recreate if you want to test it though. Just create a fake screen that does not get displayed because it is outside the range of your active screen, then give it some widgets that are not on the active screen. That is basically how I had it set up.
Ah. Ok. Now I understand. Yes, that would start the widget.
I got the following error in the logs after adding the visualizer widget. I have not played any music yet: