dash-to-dock icon indicating copy to clipboard operation
dash-to-dock copied to clipboard

Cycle Through windows + minimize

Open fastrizwaan opened this issue 8 years ago • 13 comments

Kindly add Cycle Windows + Minimize feature to Dash to Dock, as it will allow dash to have the behavior of task bar which most computer users are used to. (i.e., click to restore and minimize). It does feels right like dock click to minimize and restore and dash switch tasks.

screenshot from 2017-01-10 20-24-12 dash-to-panel https://github.com/jderose9/dash-to-panel has this feature.

Please consider. Thank you.

fastrizwaan avatar Jan 10 '17 15:01 fastrizwaan

I tried the behaviour in the dash-to-panel extension, and honestly I find it a bit confusing. Is it really a common behaviour on other desktops/platforms?

That said, it should not be too difficult to add this option too, so I might consider it for a future release. Pull request are welcome.

micheleg avatar Jan 10 '17 20:01 micheleg

The cycle windows + Minimize brings:

  1. minimize+restore of windows and classic taskbar desktops;
  2. switch tasks (cycle windows) of dash
  3. minimize all windows + restore all windows of a dock like plank.

1st one the classic one requires right+click and minimize all windows (2 mouse button use) 2nd requires shift+click for each window but does not allow minimize all / restore all 3rd won't allow window switching with click, but have to use right-click menu

  1. The Cycle+Minimize allows all the 3 with just 1 clicking action, which is comfortable as we only have to click a single mouse button, and can also be useful for touch interface where no right-click method is available (except the press and hold thingie which again wastes the time and slows the work down)

Please see 2m video: https://youtu.be/jYF5R6nrg0I

Thank you for Dash to Dock, I can't imagine using gnome-shell without it! Thank you!

fastrizwaan avatar Jan 11 '17 04:01 fastrizwaan

I added this code but I'm still not completely happy with it. I haven't seen an icon taskbar/dock on any desktop environment that behaves this way, but I haven't found one that I completely liked either.

An almost universal behavior is to minimize/restore on click when only a single window is open. When adding a 2nd window of the same application, the Cycle behavior doesn't make sense to me as it causes that minimize behavior to completely disappear - it makes the click action feel unpredictable if I'm not paying attention to whether there are multiple instances running. And, I lose ability to minimize the application from the taskbar (only when multiple windows are open).

But, minimize/restore of all windows doesn't make sense to me either - I then lose access to the 2nd window when multiple windows are open without digging into a submenu. In both cases I feel "punished" for having a 2nd instance running.

The problem with my current implementation is that as a user I don't consciously keep track of the order the instances were opened and where the currently focused window falls in that list. So when I click the icon I may get the minimize behavior or I may get the next window. And again, I am left with unpredictable behavior. I always have to pause after clicking the icon to see if the window I want will open or I will need to click again.

I think that ideally I would have some predictive behavior, where when clicking the icon with the window already in focus, I would first get the last instance I had focused for that application (to handle my common use case of flipping between two open instances), and then cycling through all of the rest of the open windows first on each click before finally minimizing. And then after some timeout period, or leaving the hover of the icon, it would reset. But, others might find this even more confusing and it would probably take a few days of using it in the real world before deciding whether it was actually as great as it sounds :)

Sorry for the brain dump!

jderose9 avatar Jan 11 '17 16:01 jderose9

I would prefer (and i initially expected) that scrolling while pointing on a running application icon would cycle through its windows.

I would expect that scrolling on an application icon would cyclically raise and lower to the previous position its windows one by one, while clicking would raise and restore all -- minimize all -- restore all back.

alexeymuranov avatar Jan 13 '17 22:01 alexeymuranov

@alexeymuranov: that wiil hopefully be implemented soon #428. You can also select the minimize option for the click action in the settings to get the minimize-all/restore all behaviour

micheleg avatar Jan 13 '17 23:01 micheleg

I was about to feature request the same thing. I would love if its added soon, in addition to revealing open windows on mouse over like Dash to panel

haiderrehmanbutt avatar May 21 '17 08:05 haiderrehmanbutt

I was about to ask for the same thing also. I actually already modified this feature locally on my computer. I just put it in the "Focus, minimize, or Previews" option. In appIcons.js I just cycle instead of show previews.

            case clickAction.FOCUS_MINIMIZE_OR_PREVIEWS:
                if (this.focused && !hasUrgentWindows) {
                    if (windows.length > 1 || modifiers || button != 1)
                        this._cycleThroughWindows();           // <- I changed this line to cycle instead
                    else if (!Main.overview.visible)
                        this._minimizeWindow();
                } else {
                    // Activate the first window
                    let w = windows[0];
                    Main.activateWindow(w);
                }
                break;

andrewaclear avatar Feb 28 '22 08:02 andrewaclear

Can you please add this as another option or replace the previews one as I put here?

andrewaclear avatar Feb 28 '22 08:02 andrewaclear

Actually the version that you were proposing sounded kinda interesting tbh @jderose9. That actually kinda makes sense to cycle through all the windows and then minimize so that you can still minimize. I'd like to try that. For the widows previews I think they should just be able to pop up when you hover on the icon. Then all the features would be nicely implemented at the same time!

andrewaclear avatar Mar 04 '22 08:03 andrewaclear

@alexeymuranov @micheleg the issue with scrolling is that you can't do that on a touch screen and I think it would be good to think about touch screens as that is where technology is going now. It could be an option for mouse users, but shouldn't be the only option.

andrewaclear avatar Mar 04 '22 09:03 andrewaclear

Same as #1414 #1749

You could think of "Cycle windows + minimlize" it this way, if that helps:

It's the same as Minimize/maximize, except that if an app is already maximized, and you press the number shortcut again, it basically does the same as "Focus next window of the same application".

For some people it can be intuitive. It's really simple: pressing Cmd + N brings back focus to the app and whatever window of that app was last active, if there were more than one window for that app. And using the shortcut again, just moves to the next window of that app. You just know that you switched context, and as you switch again to say Google Chrome, and come back to the Terminal, what was the last context in the Terminal, and that you're going to see the last active window for the Terminal. There is nothing unintuitive about it imho. Whatever window for any given app was last active is what you get when you switch to it, you see it pop up visually, so if you know want to switch to the other terminal, you just tap that shortcut once more.

I don't remember for sure if it was just like that in Windows 10, I think it was - maybe that's why itj ust feels natural for me - and so having that option in Dash 2 Panel made it so much easier coming from Windows.

I would argue that having that option would also make it easier for users to switch from dash 2 panel to your extension. The extensions have similar settings like background color, opacity, size of icons etc. Having more feature parity just makes it easier for users to switch between those extensions.

edit: my bad, so as a workaround I guess I can use just "Minimize" and then use the global keyboard shortcut "Switch windows of an application" to do something similar to "Cycle windows + minimize". I guess the latter is just a little cleaner as you don't have to see the "alt tab" GUI when you switch to the next window of the running app.

fabd avatar Sep 12 '22 09:09 fabd

I was about to ask for the same thing also. I actually already modified this feature locally on my computer. I just put it in the "Focus, minimize, or Previews" option. In appIcons.js I just cycle instead of show previews.

            case clickAction.FOCUS_MINIMIZE_OR_PREVIEWS:
                if (this.focused && !hasUrgentWindows) {
                    if (windows.length > 1 || modifiers || button != 1)
                        this._cycleThroughWindows();           // <- I changed this line to cycle instead
                    else if (!Main.overview.visible)
                        this._minimizeWindow();
                } else {
                    // Activate the first window
                    let w = windows[0];
                    Main.activateWindow(w);
                }
                break;

@andrewaclear There is also an implementation in #1749 fyi, not sure what the differences are.

fabd avatar Sep 12 '22 10:09 fabd

Looks like we are aiming for the same functionality, essentially the same. Could you please add this as an option? We're you able to fix the cycling issue by first focusing the app and then cycling?

So basically:

  • 1 window: focus, minimize
  • 2+ windows: focus most recent, then cycle

It would be super helpful if we could please have this feature.

andrewaclear avatar Sep 13 '22 05:09 andrewaclear