antroids / application-title-bar

KDE Plasma6 widget with window controls
GNU General Public License v3.0
67 stars 5 forks source link

Showing only information from current screen #8

Closed matiux closed 6 months ago

matiux commented 6 months ago

As with other similar applets, might it be possible to manage this behavior? I have two monitors with two menu bar. Putting the applet in each menu bar, I would like to see title and button only for the window in the current screen.

antroids commented 6 months ago

Implemented in 0.3.2, uploaded to the Store. I didn't find where to take Virtual Desktop id to filter by it, but filtering by Activity and Screen should work well.

Kasi07 commented 6 months ago

First, thanks for all your work!

I found a bug with this feature. My setup: 2 Displays which both have the plasmoid in a top bar installed. When I move a window to another display, it will then activate the widget on the display I moved it too but not remove it from the old one. This only changes if I focus another window.

antroids commented 6 months ago

Thanks for your report! This should be resolved in the 0.3.6.

Kasi07 commented 6 months ago

So I upgraded to the new version but it seems like the bug persists.

antroids commented 6 months ago

Could you restart plasma and check again. plasmashell --replace &

Kasi07 commented 6 months ago

I installed, restarted the plasmashell, checked for the correct version and when it didn't work I even restarted my PC just to be sure.

D3SOX commented 6 months ago

I think there's a bit of confusion here. @antroids you implemented filtering by Virtual Desktops but Plasma does not attach them to a monitor, so Virtual Desktop 1 is Virtual Desktop 1 on every screen simultaneously.

More context in similar projects: https://github.com/dhruv8sh/plasma6-window-title-applet/issues/6 https://github.com/moodyhunter/applet-window-buttons6/issues/4

antroids commented 6 months ago

I installed, restarted the plasmashell, checked for the correct version and when it didn't work I even restarted my PC just to be sure.

Could you please check the 0.3.7. If the bug still persists, could you attach OS and Plasma version details from About this system screen.

antroids commented 6 months ago

I think there's a bit of confusion here. @antroids you implemented filtering by Virtual Desktops but Plasma does not attach them to a monitor, so Virtual Desktop 1 is Virtual Desktop 1 on every screen simultaneously.

More context in similar projects: dhruv8sh/plasma6-window-title-applet#6 moodyhunter/applet-window-buttons6#4

No, there was a bug with moving from one screen to another.

And yes, it would be nice to have an option to show buttons for top task for each screen, like it was in Unity. I could try to show lastActive task, like it's implemented in widgets from your links, but not sure that it will be the same.

Kasi07 commented 6 months ago

This is working now, thanks alot!

antroids commented 6 months ago

Help wanted! download

I added some nice features for multiple screens, but got segmentation faults during development (yeah, sure, nothing wrong with CPP, it's just used incorrectly). It seems that the issue was fixed, but I would like to test it well. So, in Release 0.3.8 (not uploaded to the Store yet) I added an option to show last active task, not the current one. It can be activated on Behaviour options tab.

image

Could you please install the new version and check how it works.

Kasi07 commented 6 months ago

The "show last active task" works great for me.

Although I found a small bug. Replication steps:

  1. open two windows of the same program on one display
  2. Try to close using the applet close button
  3. Both windows are being closed instead of just the last active one. I also noticed that before the name of the second window would be shown with a <2> appended to it. This does not happen anymore.

Thanks for the effort!

antroids commented 6 months ago

Although I found a small bug. Replication steps:

  1. open two windows of the same program on one display
  2. Try to close using the applet close button
  3. Both windows are being closed instead of just the last active one.

Good catch! The bug is confirmed: https://github.com/antroids/application-title-bar/issues/16 It seems there is a window group in the tasks list.

Upd: should be resolved in 0.3.9