bbidulock / icewm

A window manager designed for speed, usability, and consistency
Other
577 stars 98 forks source link

Possibility to group taskbar buttons of the same application #198

Open marcelkorpel opened 6 years ago

marcelkorpel commented 6 years ago

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

gijsbers commented 6 years ago

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...

marcelkorpel commented 6 years ago

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

exebook commented 4 years ago

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.

gijsbers commented 4 years ago

See icewm-winoptions and look for order:.

Navigator.order: 42
exebook commented 4 years ago

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

marcelkorpel commented 4 years ago

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
gijsbers commented 4 years ago

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

exebook commented 4 years ago

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?

gijsbers commented 4 years ago

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?

exebook commented 4 years ago

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 commented 4 years ago

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

gijsbers commented 4 years ago

It is a good idea.

Code7R commented 3 years ago

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?

gijsbers commented 3 years ago

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

Code7R commented 3 years ago

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)

marcelkorpel commented 3 years ago

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.

Code7R commented 3 years ago

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).

gijsbers commented 3 years ago

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 commented 3 years ago

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

exebook commented 3 years ago

@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 commented 3 years ago

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

gijsbers commented 3 years ago

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

exebook commented 3 years ago

Selection_081

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

exebook commented 3 years ago

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

Sondro commented 2 years ago

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.

gijsbers commented 2 years ago

See this pic: g

Sondro commented 2 years ago

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.

gijsbers commented 2 years ago

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

Sondro commented 2 years ago

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.

Vrihub commented 2 years ago

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:

cheapy commented 1 year ago
  1. above is working on mine. I have been using it lately because I have a separate browser window for each group of projects, for example. To test it I opened browser, terminal and file manager windows in workspace 3 and the taskbar in 3 other entries from workspace 2.
  2. yes, that would be a nice enhancement, for me if it would just put them together by user that would be enough. Ie my root terminals separate from regular user so they don't get confused. I'm not as organized and don't have mine coded in winoptions.
gijsbers commented 1 year ago

Some options exist:

  1. applications like terminals often have options to set its name or class. Like xterm has -name and -class, mlterm has --name. If you know a terminal is going to be for root then you can set those options.
  2. icesh lets you filter on property values and invoke actions on that selection. From that one could set a property value with xprop on a running application.

Not all applications support WM_COMMAND. gnome doesn't.

gijsbers commented 1 year ago

@Sondro I'd like your opinion on the new Window List (since 3.2.2). It's sorting was much improved.

The 'Minimize All' & 'Close All' menu entries are complicated, because that menu is owned by the frame class and the task button is oblivious to how it all works. However, it is easy to add those commands as hotkeys using icesh: icesh -f +g minimize.