icewm icon indicating copy to clipboard operation
icewm copied to clipboard

Possibility to group taskbar buttons of the same application

Open marcelkorpel opened this issue 7 years ago • 33 comments

I'd like to see an option to group all taskbar buttons of one application next to eachother, so I don't have to rearrange buttons manually (thanks to issue #172 for pointing me to this possibility). E.g., when opening a new window of Firefox the new taskbar button appears to the right. Instead I want it next to its sibling (according to window classes and/or names).

Compare these two bars, the top one is how it is now when a new Firefox window opens, the bottom one shows what the option should result in:

bar

marcelkorpel avatar Nov 14 '17 19:11 marcelkorpel

Features like this are difficult since different people prefer different sorting criteria. E.g. examine the output of xprop | grep NAME for various applications and think about which ones could be used. So we'd need to add a Lua extension and make everything scriptable...

gijsbers avatar Nov 15 '17 20:11 gijsbers

That doesn't sound very doable and especially not according to the 'philosophy' of IceWM.

marcelkorpel avatar Nov 15 '17 21:11 marcelkorpel

I also need this to group Firefox and Xterm windows together.

I just tested xfce4-panel, mate-panel, cairo-dock, they all are capable of grouping out of the box. I'd be happy with grouping by WM_CLASS.

What makes it against IceWM philosophy? It's a pretty minimalist feature, just displaying a drop down menu. It's much more modern to me than virtual desktops, I stopped using them 10+ years ago.

exebook avatar Feb 02 '20 23:02 exebook

See icewm-winoptions and look for order:.

Navigator.order: 42

gijsbers avatar Feb 03 '20 09:02 gijsbers

@gijsbers I cannot find Navigator.order in this man, I also looked in the repository's man/icewm-winoptions.pod, can you elaborate please?

exebook avatar Feb 03 '20 22:02 exebook

Navigator is the class name of Firefox, all windows with the same class get the same order in the taskbar, the higher, the more to the right.

For instance, I added these to my winoptions file:

Thunderbird.Mail.order: -10
Chromium.order: -9
pi.order: -8
urxvt.order: 42

marcelkorpel avatar Feb 03 '20 22:02 marcelkorpel

Yes. Thanks Marcel. @exebook Did you find order: in icewm-winoptions? Did you run xprop | grep WM_CLASS and click on firefox?

gijsbers avatar Feb 03 '20 23:02 gijsbers

Ok I think I missed the point, I heard "grouping" and thought of grouping multiple windows under the same tab, but this thread is about ordering them next to each other. Well, did anybody ever requested grouping windows under the same tab with the popup menu to choose which one you want?

exebook avatar Feb 04 '20 11:02 exebook

No, you are the first to propose that feature. Could tell us a bit more how it should work? Does the menu list need to be sorted? On what criteria? How would you like to configure it in the preferences file? Do xfce4-panel, mate-panel, cairo-dock support it right out of the box or do they require configuration? In what sense do they differ? Which implementation do you prefer?

gijsbers avatar Feb 04 '20 21:02 gijsbers

Sorting remains the same, I mean in the drop down the windows are sorted by the same alg as in the main task bar.

No configuration is needed except for turing the entire feature on/off.

Those other taskbars (xfce/mate/cairo-dock) do it out of the box, and I think do it by default, although you can turn it off, although in xfce4-panel I think it was off by default but not really sure about this last point.

I did not notice any difference, they just look the same apart from cairo-dock/MacOS being docks (large icons+animations) rather than taskbars (text+small icon).

What my intuition tells me is that in all those apps windows are grouped if they have the same icon, this is also true for Windows/MacOS, but I am not sure how it works under the hood, really. Although I liked what Windows does: it draws the main button of the group differently if it has more windows in it, like increasing the border bevel.

Cairo-dock is graphics oriented so it has multiple ways to customize look and offers various animations to choose from, this is quite bloaty.

Cairo-doc screenshot:

Selection_009

xfce4-panel screenshot:

Selection_010

I cannot make a screenshot from mate-panel now, because it stopped working after I spent some time trying to configure it to my liking.

PINNING

There is one extra feature that maybe worth implementing for grouped windows: it's pinning. Pinning is present in Mac/Windows/Cairo-dock, not present in xfce4-panel, mate-panel crashed so cannot check. Pinning works like this: you right-click the main group button and the dropdown has the "pin it" button (it can also be after the separator in the actual window group dropdown/up menu), once the group is pinned, the group button will be always present in the taskbar even if there is no for example Firefox running, it just has zero items, but once you click the pinned button when it has zero items, the corresponding program will start. It never occured to me to think how it works under the hood, how does it know the binary path etc. Pinning allows you to achieve some of the things as toolbar normally does without the need to use text editor to modify the ~/.icewm/toolbar file.

Emotional part: to me as 99.999% Linux+IceWM user, grouping and maybe pinning is the only feature from Mac/Windows/Large DEs for Linux that I think is a cool and modern and worth having and I kind of envy a bit.

exebook avatar Feb 07 '20 11:02 exebook

Hey guys, is this a good idea to create a feature request issue on this?

exebook avatar Mar 11 '20 09:03 exebook

It is a good idea.

gijsbers avatar Mar 11 '20 12:03 gijsbers

This menu popup is probably hard to implement if it has to look like something.

What probably could be done easily is the grouping itself. I have had it somewhere on my private wishlist for a while. Simply ensure that window items for the same application are put together (means: sort them when added initially and shift the others) and then remove the icons for all but the first item in each sequence.

@gijsbers Can we agree on that?

Code7R avatar Dec 21 '20 13:12 Code7R

The primary motivation is to significantly reduce the number of task buttons on the task bar. Grouping alone doesn't address that.

gijsbers avatar Dec 21 '20 19:12 gijsbers

It depends. Looking at the original post from @marcelkorpel I got the impression that the actual motivation is getting more space for the button text, to make it more readable. And for that goal the most simple remedy would be the omission of redundant icons and using that space for the button texts. Maybe that's a good experiment subject for myself in the upcoming xmas days.

(note: I am not talking about the popup list wish from exebook, just ordering of existing buttons and icon removal)

Code7R avatar Dec 22 '20 13:12 Code7R

To be more precise, my original feature request was to define the order of taskbar buttons, so they were easier to find, not to group them together, like @exebook wants. My wish was already implemented (with the order window option). I'm fine with "hijacking" this issue to gain a finer granularity, but that was not what I asked in the first place.

marcelkorpel avatar Dec 22 '20 14:12 marcelkorpel

Essentially, yes, .order does exist but it is a static value. What I envision is a smarter version of this. So if the value is set to something like "autogroup" then a newly created entry would search for a previous entry of the same class and then get the same internal order value (or a close one, if some ranges are preserved, like 1000x chunks for each new window class).

Code7R avatar Dec 22 '20 15:12 Code7R

The grouping of several tasks under a single button is a more powerful feature. To achieve this the TaskBarApp class must be split in a button class and an app class. Then a menu can be created with little effort. Even the "pin it" button comes within reach.

gijsbers avatar Dec 22 '20 20:12 gijsbers

@exebook mate-panel 1.24.0 doesn't seem to be willing to do grouping. Where do you configure that?

gijsbers avatar Mar 13 '21 15:03 gijsbers

@exebook mate-panel 1.24.0 doesn't seem to be willing to do grouping. Where do you configure that?

Cannot find that setting myself, seems I lied about it unintentionally, I tried dozen of task bars/window managers that day and must have made a mistake about it, I must have meant some other one. Sorry about that.

exebook avatar Mar 18 '21 11:03 exebook

Why do you ask? Want me to try to find other ones that have this feature?

exebook avatar Mar 18 '21 11:03 exebook

I just wanted to learn about good ideas from others. But maybe you can try the new TaskBarTaskGrouping and comment?

gijsbers avatar Mar 18 '21 12:03 gijsbers

Selection_081

It just works, see the screenshot. I added some minor issues though: 560

exebook avatar Mar 18 '21 13:03 exebook

Cool idea to ditch the badge counter and instead draw "bradcrumbs" or whatever those dots are called:

Selection_084

Inspired byt this random MacOS screenshot:

Selection_083

exebook avatar Mar 18 '21 13:03 exebook

How do I enable this feature to test it?

I have 2.7.0 & edited with sudo @ /usr/share/icewm/preferences to /etc/X11/icewm/preferences. There was no apparent entry for TaskBarGrouping=1 # 0/1 so I made one after TaskBarGraphHeight, saved & then restarted icewm, but it didn't seem to work.

Sondro avatar Sep 08 '21 15:09 Sondro

See this pic: g

gijsbers avatar Sep 08 '21 17:09 gijsbers

Nice, thanks. There should be a separator with 2 bottom items: '_ Minimize All' & 'x Close All'. Plus, right clicking a menu item should close it, but keep the menu open (so you can close multiples -- maybe use a checkbox widget?).

Many times windows can have the same name (like Terminal), but you don't know what you're selecting. On other OSes they can have a mini preview window on hover. This might be too difficult to make easily, so maybe the ability to temporarily unminimize & select the window on hover or with a key press (although this has the draw back of being memory intensive if the window requires it).

NOTE: An outline, alt-highlight selection (like grayed out) would be much better than the diamond that replaces the icon. This currently limits you in the future if you want to have multiple icons (like web pages can have different icons per bookmark). Some apps update their window icon in real-time too so you can see how something is being processed (or to represent a different state).

You are now 99% of the way to having THE top tier functional dock.

If you then add the ability to have icons only in the the taskbar & a '✓ Keep in Dock' menu item below 'x Close All' (+ make that closed taskbar item function as a Link) -- you can then eliminate/reduce the other Links widget & increase even more space (2x+ depending on how many executable Links the user has).

I & many other users are using Plank as a necessary evil for Grouping & it's just massively over-complicating things (z-fighting with the icewm dock if you have it on the bottom or cluttering up the UI if you have it elsewhere).

Great work thus far.

Sondro avatar Sep 09 '21 04:09 Sondro

Thanks for the feedback. Similar functionality is available in WINDOW LIST.

gijsbers avatar Sep 09 '21 19:09 gijsbers

The problem with the Window List UX pattern is it's going backwards from organized -> unorganized. It's like going back to not having groups in the taskbar.

The Window List just dumps all your windows with no sorting & there's already vastly superior Task Manager apps that offer sorting, but also RAM, CPU, priority, windowless tasks, etc, etc.

Having at least 'Minimize All' & 'Close All' in the taskbar groups is a well established UX pattern going back to Windows XP in 2001 (20+ years ago), then copied in Mac OS X's dock, & duplicated in Linux. It's an unorganized -> organized pattern that enables you to quickly clean-up & focus on specific apps. This is especially vital when using multiple apps.

For example 3D Material Design: Substance 3D to generate basic maps, Blender as a preview window/3D glue, Gimp to fine-edit individual maps, Geany for shaders/notes editing, Calculators for needed math, & Browser windows for notes, documentation, tutorial videos, etc. Being able to just 'Minimize All' of one specific app as you move between them is huge to reduce clutter & increase focus -- but you still need many of these extra windows open + loaded for quick reference & to parallelize the rounds of your work flow.

Similarly, there is a reason why Cascade/etc windows was also placed under taskbar groups in XP -- it makes no sense to just dump all your random windows on the screen (& then have to reorganize them all 1 by 1, over & over). Certain apps that have static or useful small sizes like Terminal or File Manager are good at Cascading/tiling. Web pages or Graphics apps on the other hand, all need to be sized & scrolled to the specific benefits of the individual page or document's design. Plus, you are also able to then 'Minimize All' of that specific type of Tiled windows to later quickly clean up.

Sondro avatar Sep 10 '21 18:09 Sondro

This is a nice feature, but I have a couple of suggestions.

  1. Currently tasks are grouped across all workspaces, i.e. a group will contain windows that are possibily scattered in different workspaces. This can be useful in some workflows, but in my case, I already move related windows in workspaces (think of workspaces as "sessions" or "projects" hosting related windows), so the current behaviour is confusing.

There should be a configuration option to make this feature workspace-dependent, e.g. only group windows belonging to the current workspace.

  1. Currently it seems the only grouping parameter is WM_CLASS; this is too limited, e.g. all applications running in xterm are grouped together, regardless of the program running in the xterm.

Some ideas to make it more flexible:

  • User-defined rules in the winoptions file: e.g. to group together all windows that run the same program, using a regexp or word match in the WM_NAME or WM_COMMAND property.
  • User-defined "manual" groups: the user could select multiple taskbar items and assign them to an arbitrary group (and edit the group name too). Like: ctrl+click on some taskbar items, right-click on one of them to get a menu with the list of current groups to assign the items (or "New group" to create one). Or: select the items then drag-drop them into one of the groups.

Vrihub avatar Dec 10 '21 15:12 Vrihub