Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
troyvit opened this issue Aug 25, 2024 · 7 comments
Closed

Comments

@troyvit
Copy link

troyvit commented Aug 25, 2024

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
Copy link
Collaborator

s-n-g commented Aug 26, 2024

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

@s-n-g
Copy link
Collaborator

s-n-g commented Aug 26, 2024

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

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
Copy link
Author

troyvit commented Aug 29, 2024

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
Copy link
Collaborator

s-n-g commented Aug 29, 2024

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.

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.

👍

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
Copy link
Collaborator

s-n-g commented Aug 30, 2024

gist help section updated 🎉

@s-n-g
Copy link
Collaborator

s-n-g commented Aug 30, 2024

fixed in 0.9.3.10

@s-n-g s-n-g closed this as completed Aug 30, 2024
@troyvit
Copy link
Author

troyvit commented Aug 30, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants