coderholic / pyradio

Curses based internet radio player
www.coderholic.com/pyradio
MIT License
952 stars 129 forks source link

[FEAT] Documentation: pyradio + tmux "solves" terminal restrictions? #254

Closed troyvit closed 2 weeks ago

troyvit commented 2 weeks ago

Is your feature request related to a problem? Please describe. The theme documentation talks about terminal restrictions, specifically:

PyRadio will not display colors correctly when executed within specific terminals, konsole, yakuake, deepin-teminal, qterminal and terminology, just to name a few.

I was screwing around learning tmux in yakuake, and just for fun I ran pyradio from within tmux. Theming works perfectly in there, while running pyradio in a straight yakuake terminal has broken themes.

Is it worth adding this workaround to the documentation? I'm super new to tmux so I have no idea why this would work, but I wanted to bring it up to any kde folks like me out there who love pyradio.

Describe the solution you'd like Update the documentation if it's worthwhile. If this is worthwhile I'd be happy to make a PR with an update.

s-n-g commented 2 weeks ago

This is a great find! :clap: :clap: :clap: Let me check and get back to you!

s-n-g commented 2 weeks ago

Ok, I have checked all the terminals referenced in the documentation; tmux makes pyradio work with full color on all of them :100:

I have prepared a bash script tmux_pyradio that will help you execute pyradio through tmux.

Can you please test its operation, and if successful, we'll take it from there

troyvit commented 2 weeks ago

The script works great in yakuake. I also tried it in xterm to see how a terminal that already works does it. It worked fine.

If I try to run two tmux_pyradio sessions I get an error saying duplicate session: pyradio. That's a tmux thing and easy to get around by adding a new session name per the print_usage() instructions.

I tried tmux_pyradio -l to get a list of stations. I saw the stations for an instant but then the script detached me from tmux, so I couldn't view them.

If I run tmux_pyradio random_string I see a flash (probably pyradio telling me to quit it) and then I'm dumped back to the terminal.

I was able to trigger the help with tmux_pyradio -h.

I installed terminology and tried that out. pyradio gives a warning when you launch it saying that themes won't work, and indeed they don't (although terminology handles the base theme better than konsole and yakuake). When I launch tmux_pyradio from terminology I don't get the error and themes work great.

So yeah I'd say that the only issue I found is that when tmux_pyradio exits to the command line you can't see it because you're also exiting tmux.

Let me know if I can test more. Glad to be able to give a little back for all the good work you do!

s-n-g commented 2 weeks ago

The script works great in yakuake. I also tried it in xterm to see how a terminal that already works does it. It worked fine.

:+1:

If I try to run two tmux_pyradio sessions I get an error saying duplicate session: pyradio. That's a tmux thing and easy to get around by adding a new session name per the print_usage() instructions.

:+1:

I tried tmux_pyradio -l to get a list of stations. I saw the stations for an instant but then the script detached me from tmux, so I couldn't view them.

Yes, this is unavoidable; tmux runs as long as pyradio runs and it clears the screen on exit, so...

If I run tmux_pyradio random_string I see a flash (probably pyradio telling me to quit it) and then I'm dumped back to the terminal.

Same thing; pyradio exits with error -> tmux exits and clears the screen

I was able to trigger the help with tmux_pyradio -h.

I do hope the help screen is good enough Any suggestions to improve it?

I installed terminology and tried that out. pyradio gives a warning when you launch it saying that themes won't work, and indeed they don't (although terminology handles the base theme better than konsole and yakuake). When I launch tmux_pyradio from terminology I don't get the error and themes work great.

So yeah I'd say that the only issue I found is that when tmux_pyradio exits to the command line you can't see it because you're also exiting tmux.

:+1:

Let me know if I can test more. Glad to be able to give a little back for all the good work you do!

No, I think we have established that the script works, I will just update the documentation to point to it, that would be enough

Thank you for reporting this one, bypassing it would add to user experience!

s-n-g commented 2 weeks ago

gist help section updated :tada:

s-n-g commented 2 weeks ago

fixed in 0.9.3.10

troyvit commented 1 week ago

Hey sorry I didn't get back to you sooner. The help screen looks great. Thanks so much for implementing this!