Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-04-17 15:08:26

Brian
Member
Registered: 2023-03-22
Posts: 15

Group window buttons without stacking/combining them

Hello,

Is there any way to group window buttons together by type so that they always remain (or initially open) next to one another? E.g. all the Mousepad windows would be beside one another as one group, and all the Thunar windows as another, and so on?

This is exactly what I expected the "Group windows by application" toggle option to do. But instead of just grouping, it stacks them on top of one another so that they all get combined into one button. I don't wish to hide any windows away like that and prefer to keep the functionality of being able to see all open windows at once, and switch between any given two of them with a single click.

I typically have a lot of different windows open with my usual workflows, so any other tips or advice for better organising them, or making them more distinctive would also be much appreciated (I plan to look into the CSS side of things some day – I would like to be able to make the window button icons a bit larger for a start?). Grouping by timestamp or window title is too arbitrary and inflexible I find, and the latter causes the order to keep jumping around when the title changes (e.g. as you navigate through different directories in Thunar).

Another way of thinking about this is by comparison to the options you get around managing the choice of new tab position in internet browsers (i.e. next to parent or at the end of the list). So instead of always locking the group together as you get in Windows, one could instead just open new window buttons next to any pre-existing ones from the same application, rather than at the end of the list. Whether they then always stay locked together as you move the group around, or can be freely re-arranged however you wish is another possible variable here, but either way just having the groups in the first place would be a big improvement for me.

I had a search but I couldn't find any prior discussions on this topic, but curious to hear what other people's views on this are.

Offline

#2 2023-04-17 16:28:00

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Group window buttons without stacking/combining them

The best you can get with existing functionality would be the "Group title and timestamp" option - this should stop the jumping around problem.

Whether they then always stay locked together as you move the group around, or can be freely re-arranged however you wish is another possible variable here, but either way just having the groups in the first place would be a big improvement for me.

This functionality isn't currently possible, and would need to be developed.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-04-22 11:18:21

Brian
Member
Registered: 2023-03-22
Posts: 15

Re: Group window buttons without stacking/combining them

ToZ wrote:

The best you can get with existing functionality would be the "Group title and timestamp" option - this should stop the jumping around problem.

OK, thank you. I am trying that out now, and yes you are right, this is the closest option to what I want. I only miss being able to have my own order to the applications, rather than just alphabetical, since I prefer to have my most used programs together on the left side rather than moving around as others are opened and closed. I suppose an alternative way I could achieve a very similar effect would be if I could pin certain applications in place as you can with the Docklike Taskbar, but I don't think there is any way to do this with Window Buttons?


ToZ wrote:

This functionality isn't currently possible, and would need to be developed.

Thank you for confirming. Do you happen to know where the relevant code for the sorting order might be found? I am no developer, but always happy to have a tinker and see if I can do anything of use at all smile

Offline

#4 2023-04-22 17:40:51

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Group window buttons without stacking/combining them

Brian wrote:

Do you happen to know where the relevant code for the sorting order might be found? I am no developer, but always happy to have a tinker and see if I can do anything of use at all smile

tasklist-widget.c source.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2023-05-12 20:35:19

Brian
Member
Registered: 2023-03-22
Posts: 15

Re: Group window buttons without stacking/combining them

Thank you!

Having spent some more time now with the 'Group by title and timestamp' option I am finding that it mostly works as expected, but still has a few quirks that can make it a bit unpredictable at times. After testing it more thoroughly, I think what it is typically doing is sorting by the underlying process or package name, rather than the launcher name. This can get confusing if it differs from the application name, or if it has been given a simpler launcher name in your distribution (e.g. anything with a package name starting with xfce- always gets sorted under 'X', and those that have a gnome- prefix under 'G' etc., no matter how it is called in the launcher).

It becomes particularly unpredictable when it comes to Flatpaks, as it appears that some of them are being sorted by the underlying package names (e.g. starting with com.github.. etc.), while others are sorted by their actual application name. As some examples:
Flatseal and SaveDesktop are being sorted under 'C' and 'I' respectively form their package names, whereas Frog, Gmusicbrowser, LocalSend and XnView are being sorted correctly by the application name (i.e. 'F', 'G', 'L' and 'X' respectively).

And finally, one that I cannot find any explanation for is pamac, which always gets sorted right at the beginning for some reason. In any case, it would be much nicer if everything was instead sorted by the Name as defined in the launcher .desktop files, to be consistent with everything else like the Whisker Menu, Application Finder, MenuLibre etc. I don't know if this has been discussed before or should be considered as a bug or feature request?

From looking at that source code, I think that possibly the sorting name is being determined by xfw-application-get-name (due to XfwApplication being connected with "app" in the code). ...And I don't know if the section under /* if there is no app name, use the window name */ might have any relevancy here or not. But this is all fairly wild conjecture on my part given my zero knowledge of coding.

Offline

#6 2023-05-13 01:41:41

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Group window buttons without stacking/combining them

Brian wrote:

I don't know if this has been discussed before or should be considered as a bug or feature request?

As far as I can remember, this code has stayed the same. If you feel there is benefit to an adjustment to this logic, then feel free to create an enhancement request.

From looking at that source code, I think that possibly the sorting name is being determined by xfw-application-get-name (due to XfwApplication being connected with "app" in the code). ...And I don't know if the section under /* if there is no app name, use the window name */ might have any relevancy here or not. But this is all fairly wild conjecture on my part given my zero knowledge of coding.

xfw-application-get-name is from the new libxfce4windowing library that is being set up as an abstraction library to support both X11 and wayland - there has been no official release yet (although development releases are available). In 4.18, the sorting looks like its all done in tasklist-widget.c. Specifically the xfce_tasklist_sort() and xfce_tasklist_button_compare() functions.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2023-05-25 08:55:05

Brian
Member
Registered: 2023-03-22
Posts: 15

Re: Group window buttons without stacking/combining them

ToZ wrote:

xfw-application-get-name is from the new libxfce4windowing library that is being set up as an abstraction library to support both X11 and wayland - there has been no official release yet (although development releases are available). In 4.18, the sorting looks like its all done in tasklist-widget.c. Specifically the xfce_tasklist_sort() and xfce_tasklist_button_compare() functions.

OK, thank you for the clarification! So how is the name associated with the app currently defined / where is it sourced from?

Offline

#8 2023-05-25 11:30:38

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Group window buttons without stacking/combining them

Prior to 4.19 (and for X11 only), it directly used libwnck to get this information. You can see in the xfce_tasklist_button_compare() function how it references wnck* functions/libraries.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#9 2023-06-01 10:15:34

Brian
Member
Registered: 2023-03-22
Posts: 15

Re: Group window buttons without stacking/combining them

OK, thank you. If this behaviour is likely to change after 4.18, then I'm wondering if I should wait until seeing how it is working with the new library before creating a Gitlab issue about it. It would be nice to have name sorting that follows the distro or user defined app name from the launcher, but I don't know if the new library might already provide that by default, or whether it is work creating an issue simply to review it?

Offline

#10 2023-06-01 10:36:16

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: Group window buttons without stacking/combining them

I would suggest creating an issue so the developer is aware of it. @Tamaranch comes on here occasionally and he might respond if he sees this thread. He's been working on the new libxfce4windowing library.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#11 2023-06-01 10:36:27

Tamaranch
Member
Registered: 2020-12-31
Posts: 267

Re: Group window buttons without stacking/combining them

> If this behaviour is likely to change after 4.18, then I'm wondering if I should wait until seeing how it is working with the new library before creating a Gitlab issue about it.

This behavior doesn't change in 4.19 since libxfce4windowing is just a wrapper around libwnck on X11 (except for icons).

Offline

#12 2023-06-01 10:56:18

Tamaranch
Member
Registered: 2020-12-31
Posts: 267

Re: Group window buttons without stacking/combining them

> It would be nice to have name sorting that follows the distro or user defined app name from the launcher

It's not that simple. We could perhaps also sort by application name (in addition to window title and timestamp). But the way in which the library retrieves application names and window titles will remain opaque and not necessarily satisfactory in all cases.

Last edited by Tamaranch (2023-06-01 10:56:36)

Offline

#13 2023-06-08 11:30:30

Brian
Member
Registered: 2023-03-22
Posts: 15

Re: Group window buttons without stacking/combining them

Tamaranch wrote:

> It's not that simple. We could perhaps also sort by application name (in addition to window title and timestamp). But the way in which the library retrieves application names and window titles will remain opaque and not necessarily satisfactory in all cases.

Thank you very much for looking into this. What I'm really after is being able to sort/group by application name, while still allowing drag and drop re-ordering of those groups. I just got a little distracted along the way once I found that the current ordering can be a bit unpredictable, and wondered if it might be worth reporting that as a separate issue.

However, since the ordering issue is superseded by the ability to manually re-order yourself, I consider it very much secondary to the ability to re-order groups.
I'm just trying to understand first what might be realistic here to ask for, and do as much as I can with my next to zero understanding to help move it forward and create an enhancement request that is as useful as I can possibly manage. But if there really is nothing I can do to help, then I will just go ahead with an enhancement request describing it as best I can.

Thanks again, and for all the work on XFCE which is truly appreciated!

Offline

#14 2023-06-08 14:47:02

Tamaranch
Member
Registered: 2020-12-31
Posts: 267

Re: Group window buttons without stacking/combining them

> What I'm really after is being able to sort/group by application name, while still allowing drag and drop re-ordering of those groups.

This one already exists (for a long time...): https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/15

Offline

#15 2023-06-23 19:05:24

Brian
Member
Registered: 2023-03-22
Posts: 15

Re: Group window buttons without stacking/combining them

Tamaranch wrote:

This one already exists (for a long time...): https://gitlab.xfce.org/xfce/xfce4-panel/-/issues/15

Great to see thanks. I guess all the best things in life are worth waiting for... smile

Offline

Board footer

Powered by FluxBB