pyradio icon indicating copy to clipboard operation
pyradio copied to clipboard

[FEAT] Visualizer ideas

Open ghost opened this issue 1 year ago • 8 comments

I just thought it'd be neat to be able to hit a key and bring up a visualizer sort of like NCMPCPP has.

CAVA is a neat cross platform option that could work. It's in the repo for Debian and probably others as well.

Currently I start it in a separate terminal but I'd really like to not need to do that.

Ooh, could even have it as a dimmed background to the stations list as an overlay. Probably would only work on fast systems though that could handle it. But I'm thinking like #440000 for the CAVA bar colors so they're really dim. Then maybe hit a key to hide the browser interface and have the bar colors increase in brightness.

....also a clock would be neat too. I'll shut up now.

ghost avatar Dec 30 '24 07:12 ghost

Hi @Scary-Guy Happy New Year!

If you want to check the clock, download pyradio devel, unzip it and

./devel/build_install_pyradio
echo "show_time = 0" >> ~/.config/pyradio/config

More info with

pyradio -pc

(look for show_time)

You can also check the config window, or press "\t" :wink:

s-n-g avatar Jan 03 '25 12:01 s-n-g

That's awesome, I just looked at it and it works great. This will come in handy if I have the terminal fullscreen. Although I was thinking more like what's in the screenshot, but honestly either works fine. https://discuss.getsol.us/assets/files/2023-11-18/1700267271-311536-image.png

and to you as well!

ghost avatar Jan 03 '25 12:01 ghost

I wish I had seen that screenshot earlier! This would have been much easier to implement :)

s-n-g avatar Jan 03 '25 12:01 s-n-g

I have updated the code about the clock

Please download pyradio devel, unzip it and

./devel/build_install_pyradio

so that you keep up with changes

s-n-g avatar Jan 04 '25 12:01 s-n-g

Cool! Only problem is my config isn't updating when I enable the clock (or really when I do anything else.) I've just been doing it manually and really didn't think much of it. I checked the file permissions and my user account obviously has write access, and I added write access for group/everyone and still nothing.

So, what is the line I need to stick in to make it work?

ghost avatar Jan 04 '25 13:01 ghost

The file is ~/.config/pyradio/config, right?

try changing it (from the config window) and pressing "s" before anything, you will get a message "Config saved successfully!!!" at the status line.

also, try running pyradio -d

you will get a file ~/pyradio.log

this is my log after changing the config and pressing "s"

2025-01-04 15:39:17,072 - pyradio.keyboard:set_kb_letter():642 - DEBUG: setting kb_letter = 's'
2025-01-04 15:39:17,073 - pyradio.window_stack:close_window():341 - DEBUG: CLOSE MODE: CONFIG_MODE -> NORMAL_MODE - [[0, 0]]
2025-01-04 15:39:17,074 - pyradio.config:save_config():2821 - DEBUG: saved params = {'mpv': [1, 'profile:pyradio'], 'mplayer': [1, 'profile:pyradio'], 'vlc': [1, 'Do not use any extra player parameters']}
2025-01-04 15:39:17,075 - pyradio.config:save_config():2939 - INFO: Config saved
2025-01-04 15:39:17,075 - pyradio.log:restart_timer():321 - ERROR: time_format = 2
2025-01-04 15:39:17,075 - pyradio.log:start_timer():325 - ERROR: time_format = 2
2025-01-04 15:39:17,075 - pyradio.log:stop_timer():350 - DEBUG: timer is disabled! Stoping!
2025-01-04 15:39:17,265 - pyradio.log:_show_time():215 - DEBUG: Timer threat asked to stop. Stopping...
2025-01-04 15:39:17,265 - pyradio.log:update_time():183 - DEBUG: Timer threat asked to stop. Stopping...
2025-01-04 15:39:17,265 - pyradio.log:start_timer():344 - DEBUG: timer's new time format = 2 (%I:%M:%S %p)
2025-01-04 15:39:17,265 - pyradio.log:start_timer():345 - DEBUG: timer's new update functions = (<bound method Log.write_time of <pyradio.log.Log object at 0x7fa705a915b0>>,)
2025-01-04 15:39:17,266 - pyradio.radio:keypress():7279 - INFO: 
ConfSaved    old rec dir: "/home/spiros/pyradio-recordings"
2025-01-04 15:39:17,266 - pyradio.radio:keypress():7280 - INFO: 
ConfSaved    config options recording_dir : "/home/spiros/pyradio-recordings"
2025-01-04 15:39:17,266 - pyradio.radio:keypress():7281 - INFO: 
ConfSaved    saved config options recording_dir : "/home/spiros/pyradio-recordings"

observer the messages...

s-n-g avatar Jan 04 '25 13:01 s-n-g

GAH! For some reason I thought q would save it (since it usually does in most other programs.) Works fine.

ghost avatar Jan 04 '25 13:01 ghost

Please do use the "?" to make sure about the shortcuts :wink:

s-n-g avatar Jan 04 '25 13:01 s-n-g