cosmic-launcher icon indicating copy to clipboard operation
cosmic-launcher copied to clipboard

Alt/super+tab recency-based cycling

Open WatchMkr opened this issue 1 year ago β€’ 5 comments

Recency-Based Cycling: The Alt+Tab interface should prioritize switching between applications based on the order of their last use. This means that the most recently used application will always be the first in the cycle, followed by the second most recently used, and so on.

1. Primary Use Case: When Alt+Tab is pressed and released quickly, it should switch directly to the last used application. 2. Extended Use Case: Holding Alt and tapping Tab repeatedly should cycle through the list of open applications in the order of their recency. This allows users to quickly access any of the last few applications they were working with.

WatchMkr avatar May 31 '24 00:05 WatchMkr

@WatchMkr would it make sense to support shift-alt-tab (cycle backwards) too in the same requirement? Would this be something that outsiders could contribute to?

darklajid avatar Jun 09 '24 10:06 darklajid

@darklajid Yes, shift-alt-tab should cycle backwards. We'd welcome a PR.

WatchMkr avatar Jun 11 '24 23:06 WatchMkr

@WatchMkr is there a story for increasing the number of windows that can be cycled through? I always have more than 8 windows open in my work day and it's been frustrating to have to rely on mouse and dock to find a window when it's not in the list.

curiousercreative avatar Aug 21 '24 16:08 curiousercreative

Regarding the use of ALT + TAB on PopOS (regardless of whether using the current alpha version of COSMIC) to switch between windows, is there a particular logic behind the order of the applications listed? It doesn't appear to be in alphabetical order.

thedeanominator avatar Sep 12 '24 02:09 thedeanominator

@curiousercreative the plan is to remove the 8 entry limitation when in tab+alt/super mode.

WatchMkr avatar Sep 16 '24 22:09 WatchMkr

If this is implemented, there should be an option to hide the focused window from the selector.

Pandapip1 avatar Oct 13 '24 06:10 Pandapip1

If this is implemented, there should be an option to hide the focused window from the selector.

Why? I have never seen any other desktop environment do something like this. Usually the focused window is the last one in the list. That's how Windows and every other Linux DE I know works. Why would anyone want to hide the focused windows? Sounds like an unheard-of feature that only you would use.

PoisonFrog avatar Oct 13 '24 14:10 PoisonFrog

Why? I have never seen any other desktop environment do something like this. Usually the focused window is the last one in the list. That's how Windows and every other Linux DE I know works. Why would anyone want to hide the focused windows? Sounds like an unheard-of feature that only you would use.

My bad, I didn't realize that the focused window was the last one in the list. I'm just used to alt-tabbing once to switch windows, and as currently stated, tab would need to be pressed twice. Having the focused window at the end is fine for my use-case too.

Pandapip1 avatar Oct 13 '24 15:10 Pandapip1

Usually the focused window is the last one in the list.

Really? On GNOME I see the focused window as the first, but the initial selection would be on the second window.

road2react avatar Oct 14 '24 04:10 road2react

Usually the focused window is the last one in the list.

Really? On GNOME I see the focused window as the first, but the initial selection would be on the second window.

Yeah, that's what I meant. The last one to be selected, unlike how it works in Cosmic where it actually is the first to be selected.

PoisonFrog avatar Oct 14 '24 04:10 PoisonFrog

Hope this pans out well, thanks a lot to the team for considering to fix it.

I really love cosmic so far, and it has earned its spot on my laptop - despite being in alpha. This is one of the issues that is generally workflow-breaking for me(along with a lack of a shortcut that pulls up the clipboard manager but I see that there is already an issue in the respective repo)

Thanks a lot for this project overall

sounddrill31 avatar Oct 15 '24 16:10 sounddrill31

Hi, any news on this issue? It makes it tough to use cosmic daily with the current alt tab behaviour.

Cedric-Lefebvre avatar Nov 03 '24 16:11 Cedric-Lefebvre

Hi, any news on this issue? It makes it tough to use cosmic daily with the current alt tab behaviour.

I agree. I made an initial implementation but i don't have time to work on it anymore. Here are the PRs if someone want to work on this

  • https://github.com/pop-os/cosmic-launcher/pull/150
  • https://github.com/pop-os/launcher/pull/227

And a related PR in cosmic comp

  • https://github.com/pop-os/cosmic-comp/pull/889

wiiznokes avatar Nov 13 '24 21:11 wiiznokes

#225 Should close this issue!

pwall2222 avatar Dec 16 '24 12:12 pwall2222

This implementation doesn't work properly with stacked windows. Windows in the same stack are always consecutive in the list and not recency-based ordered but stay in a predefined order.

I don't know if this is intended but it is confusing and should be changed, let me explain why: If you have windows A and B in the same stack, let's say A is always immediately before B in the list, from A pressing Alt+Tab will bring you to B but from B pressing Alt+Tab will keep you on the same window.

This is inconsistent and not practical, Alt+Tab should never keep you on the same window unless it is the only one.

Furthermore, I don't think grouping windows in the same stack is a good idea, it brakes the behavior of this sequence of actions:

  1. Alt+Tab
  2. Release everything
  3. Alt+Tab We are used to assume this sequence will bring you back where you started, but currently it is not the case, this is a convention in almost every other environment and also very useful when your workflow alternates between two windows.

In conclusion I suggest to avoid grouping stacked windows at all and order all the windows by recency ignoring stacks, I believe this is how it works currently in Pop!_OS. If you want to move inside the same stack there are the "Focus window left" and "Focus window right" shortcuts already.

Tommimon avatar Dec 18 '24 15:12 Tommimon

Just installed the fedora cosmic packages version alpha.5.1-1 and cannot see any recency based behaviour for Alt-Tab.

snaggen avatar Jan 16 '25 12:01 snaggen

Seems to work in Arch, also alpha 5.

hgaiser avatar Jan 16 '25 12:01 hgaiser

Seems to be an old pop-launcher in the fedora packaging... took that from the nightly copr and it seems to work.

snaggen avatar Jan 16 '25 14:01 snaggen

Hi @wash2 πŸ‘‹πŸΌ,

I noticed your comments in https://github.com/pop-os/cosmic-launcher/issues/130 regarding the limitation of alt-tab functionality to windows within the current workspace. You brought this up twice - once in https://github.com/pop-os/cosmic-launcher/issues/130#issuecomment-2129791864 and again in https://github.com/pop-os/cosmic-launcher/issues/130#issuecomment-2130173377 .

Could you kindly confirm whether this feature has been implemented and included in the latest updates? If not, is there a roadmap or a specific issue where this is being tracked?

Thanks a ton for your incredible work on this - it’s truly appreciated! πŸŽ‰

eevmanu avatar Jan 24 '25 04:01 eevmanu

I'm on cosmic-launcher/noble,now 0.1.0~1744762023~24.04~77ca208 amd64 [installed,automatic] and it feels like this update introduced some regression or at very least changed the behaviour of the launcher compared to previous version. Also, it doesn't fit the description of this issue.

  1. When focused on window A, pressing ALT+TAB and choosing window B causes window A to become a last entry of the list (e.g. has a shortcut of CTRL+9)
  2. Pressing ALT+TAB continously doesn't toggle between last two used windows (as it used to) but rather toggles through the whole list.
  3. When pressing ALT+TAB and keeping ALT pressed, the focus is always on the 2nd item on the list (the one with CTRL + 2). When ALT is released, expectedly then 2nd item is chosen. This causes what I described in point 2.

As an extra question, are all these behavious configurable in Cosmic?

mirfilip avatar May 05 '25 08:05 mirfilip

I'm on cosmic-launcher/noble,now 0.1.0~1744762023~24.04~77ca208 amd64 [installed,automatic] and it feels like this update introduced some regression or at very least changed the behaviour of the launcher compared to previous version. Also, it doesn't fit the description of this issue.

1. When focused on window A, pressing ALT+TAB and choosing window B causes window A to become a last entry of the list (e.g. has a shortcut of CTRL+9)

2. Pressing ALT+TAB continously doesn't toggle between last two used windows (as it used to) but rather toggles through the whole list.

3. When pressing ALT+TAB and keeping ALT pressed, the focus is always on the 2nd item on the list (the one with CTRL + 2). When ALT is released, expectedly then 2nd item is chosen. This causes what I described in point 2.

As an extra question, are all these behavious configurable in Cosmic?

I don't see this behavior on alpha 7. For me, repeatedly pressing alt+tab correctly switches between the last two applications.

There is one bug worth mentioning, sometimes if I release alt+tab, the application doesn't switch and the application switcher remains active (even when no keys are pressed). This seems to happen only when pressing and releasing alt+tab quickly.

hgaiser avatar May 05 '25 10:05 hgaiser

I don't see this behavior on alpha 7. For me, repeatedly pressing alt+tab correctly switches between the last two applications.

But are you at the same version of cosmic-launcher though?

Just to clear up. When I started with pure Alpha 7, it was indeed correct. Coherent with what is described in the issue description. However, when I later did rolling updates, it has changed. cosmic-launcher/noble,now 0.1.0~1744762023~24.04~77ca208 seem to have introduced it.

~@wiiznokes would you care to check if you suffer from the same thing?~

mirfilip avatar May 05 '25 14:05 mirfilip

I'm on cosmic-launcher/noble,now 0.1.0~1744762023~24.04~77ca208 amd64 [installed,automatic] and it feels like this update introduced some regression or at very least changed the behaviour of the launcher compared to previous version. Also, it doesn't fit the description of this issue.

  1. When focused on window A, pressing ALT+TAB and choosing window B causes window A to become a last entry of the list (e.g. has a shortcut of CTRL+9)
  2. Pressing ALT+TAB continously doesn't toggle between last two used windows (as it used to) but rather toggles through the whole list.
  3. When pressing ALT+TAB and keeping ALT pressed, the focus is always on the 2nd item on the list (the one with CTRL + 2). When ALT is released, expectedly then 2nd item is chosen. This causes what I described in point 2.

As an extra question, are all these behavious configurable in Cosmic?

Update: having now updated to cosmic-launcher/noble,now 0.1.0~1746556097~24.04~363cabd and restarted, the problem I reported is no longer there and it works as described.

mirfilip avatar May 09 '25 11:05 mirfilip

This is not working correctly on 1.0.0~alpha.7^git20250623.84b1652, as alt+tab only acts as if hitting tab.

moore-bryan avatar Jul 22 '25 11:07 moore-bryan

I'm still seeing this behavior on the Fedora Cosmic DE with the newly released beta

natemcintosh avatar Sep 26 '25 19:09 natemcintosh