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

Support for KDE Panel #21

Closed
1-minute-to-midnight opened this issue Dec 30, 2021 · 10 comments
Closed

Support for KDE Panel #21

1-minute-to-midnight opened this issue Dec 30, 2021 · 10 comments

Comments

@1-minute-to-midnight
Copy link

If it is possible.....would you modify the script so that the command can be output to the panel via the command output plasmoid?

@PrayagS
Copy link
Owner

PrayagS commented Dec 31, 2021

Thanks for reaching out.

It's been close to 3 years since I last used KDE and hence I'm not familiar with the widgets ecosystem. I'm assuming this is the command output plasmoid that you're referring to.

From what I see it only renders the stdout so you should be able to just run the scroll script by pasting this in the window (assuming the script is in your $PATH or else just paste the full location of the script),

scroll_spotify_status.sh

Note that this will just output the scrolling content but you won't be able to enjoy the functionality of the buttons since I don't see any way of enabling that in this kind of setup. I'm pretty sure there are plasmoids to control audio playback.

Let me know how it goes.

@PrayagS
Copy link
Owner

PrayagS commented Dec 31, 2021

On a second note, from what I see on this page, you should be able to incorporate play-pause toggle as a click event in the plasmoid. For that, you can paste the following command,

playerctl play-pause -p spotify

@1-minute-to-midnight
Copy link
Author

1-minute-to-midnight commented Dec 31, 2021

It didn't work. I think it is because it waits for command to finish before it gets the output. I tried it after unchecking wait for completion but it just seems to rerun the command again. I really love your project and I've been trying to replicate it for some time now. Currently I'm using awesome-widgets for the song title and artist name. But the scrolling is not working properly at the moment.

@PrayagS
Copy link
Owner

PrayagS commented Jan 2, 2022

I understand the problem and I did see that coming. I thought the plasmoid plugin will have it figured out to handle tailing commands.

Polybar for example, needs a config flag to let it know that the command it is reading is a tailing command and won't terminate exactly.

When you uncheck the option you mentioned, does it just show the initial output and then it keeps running it again? So what I understand is that the scrolling part never happens.

You might need to look for another solution in this case. I'll have a look and let you know if I catch something.

Thanks for your kind words and I hope you figure it out!

@PrayagS
Copy link
Owner

PrayagS commented Jan 2, 2022

You should take a look at this utility called plasmawindowed. It allows you to manually run arbitrary windows as widgets and also pin them on your status bar.

Using this, you might run a terminal instance running the script and then render its output using this utility on your status bar.

@PrayagS
Copy link
Owner

PrayagS commented Jan 2, 2022

For now, I'm using closing this issue. Feel free to reopen the issue if you find something and need something to be done on the script. I'll be happy to help out.

@1-minute-to-midnight
Copy link
Author

I DID IT!!!.......sort of
Screenshot_79

I didn't do anything to the script itself.....i just had to mess around with the polybar config file

width = 25%
height = 38
offset-x = 35%
offset-y = 0
radius = 0
fixed-center = true 

background = #00000000
foreground = #FFFFFF

@PrayagS
Copy link
Owner

PrayagS commented Mar 27, 2022

Hey, that's great!

Thanks for getting back and sharing this. Feel free to send in a PR (or share the details with me) and I'll add this to the README for others who might be interested.

@1-minute-to-midnight
Copy link
Author

1-minute-to-midnight commented Mar 28, 2022

All the details are in the post. You just need to change the values in your polybar config as given in my comment and launch it normally like on any other window-manager. Set the launch script for polybar to run at startup and you're done :)

Polybar overlays on top of the KDE panel so this possible. I tested this on GNOME but it seems the panel covers polybar.

I removed the background for polybar so it would match the colour of the KDE panel and disabled blur for polybar.
To disable blur for polybar: In KDE settings, under Kwin Scripts, install Force Blur. Open the settings for Force Blur and add in Polybar in the list. You have to make sure Blur all except matching option is selected under the list window.

@PrayagS
Copy link
Owner

PrayagS commented Mar 28, 2022

Ah, gotcha. I've added a link to this issue in the README.

Thanks again for contributing!

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