pop-os / cosmic-epoch

Next generation Cosmic desktop environment
3.1k stars 83 forks source link

[Feature request] Context-free navigation #759

Open KasMA1990 opened 2 months ago

KasMA1990 commented 2 months ago

After using Windows for many years, macOS for a few years, and occasionally dabbling in Ubuntu, I've come to realize that the way I prefer to navigate around on my computer is really simple: when I think of an application I need to switch to, I want to see that application immediately.

In other words, I want to see that application immediately, regardless of:

All of the above are pieces of context I need to keep in mind when navigating around on my computer. Alt-Tab switches between apps based on recency, selecting an open window of the application requires visually parsing my windows, etc.

Windows a really good solution for this: for any applications open in the task bar, you can jump between them by hitting the Windows+number key (with the number matching the index of the application on the bar). With a few pinned applications, I know that I can always get to my browser with Windows+1, terminal with Windows+2, IDE with Windows+3, etc. and I never have to care what's been going on in the system since I used them last. I'm essentially accessing the application I want in constant time, which is lovely for me at least.

On macOS, there's software like rcmd, which also exists to solve this kind of problem. It essentially re-assigns the right Cmd button on the keyboard to always be for jumping between applications, and you use the first letter of the name of application to select what jump to (e.g. RCmd+F opens Files, etc.)

I don't know what the exact solution should look like for COSMIC, but I really hope it's something that can be baked into COSMIC still. There's plenty of discussion around how good design affords people a sense of place in their desktop, but I think many of the concerns there can be sidestepped in cases where users just know where they want to arrive, but don't care about where they are or the path to get there (in terms of navigating the UI).

I know some of this workflow can be approximated with virtual desktops, but I never took a liking to them. To me, the act of organizing applications into different groups just becomes overhead. It's like adding a layer of abstraction to my desktop that I don't need. I just need to jump between applications, and adding layers to navigate only increases the mental burden of things I need to keep in mind.

I'm not trying to find a new paradigm to replace existing navigation with either, so I don't want to take anything away from others who have a good time working with the existing tooling. But I do hope I can find something that better suits myself at least, and I suspect many other power users would start to use something like this if it became available 😊

jacobgkau commented 2 months ago

Searching for an app/window in the Launcher will generally let you switch to or launch the app whether it's open already or not, without having to know where it is or how recently it was last activated. It does require a few keystrokes and can be affected by the titles of the open windows, though.

KasMA1990 commented 2 months ago

Yeah, and I appreciate search helping here, though it still is a bit context dependant. Both as you say, but also:

I don't know how the searching in COSMIC works exactly, so I may be wrong here, but when search tries to be clever, it gets harder to predict for users. For example, searching for "fi" may return "Files" and "Films" (in that order), but then searching for "fil" returns "Films" first and "Files" second. Or if search results are based on keywords that aren't readily apparent, or fuzzy matching gives weird results.

Experience tells me that although searching can do it, it also requires too much mental effort that I really want to base my workflow on it.

And even if search was perfect, I'd still rather have something like a keyboard shortcut that is as fast and predictable as it can get 😊

KasMA1990 commented 2 months ago

One navigation issue I also have in OSs at large is navigating browser tabs. Browsers are essentially a collection of web applications, where different navigation rules apply than for normal applications. But it would be nice if I didn't have to use two different navigation schemes just based on whether an application runs in the browser or not.

For example, if we assume we have a scheme a la rcmd above, maybe pressing RCmd+Y can also navigate to my YouTube browser tab. We could also imagine pressing Tab+RCmd+Y to cycle through all tabs and applications beginning with Y.

I think this would require integrating work with browsers to make work, so I'm not suggesting this is easy or trivial. But the idea makes me all the more adamant that navigation by way of "just take me I want to go" instead "let me look at my map here" would be a solid boon 😄

nevdelap commented 2 months ago

In i3 I have a workspace per application or per major use of an application and have function keys F1 thorough F12 bound to workspaces 1 through 12. So for example Chrome with work email, calendar, JIRA is on workspace 1, Slack is on workspace 2, Zoom is on workspace 3, Chrome with personal email, personal calendar, WhatsApp etc is on workspace 4, VS Code and terminals and other developments stuff is on workspace 5, etc, etc. That is enabled by rules that open things on the right workspace - I have them all open automatically on login and they all open on the right workspace, and means I can get to each thing with a single keystroke.

Cosmic epoch doesn't support bindings to workspaces or the rules to control on which workspace things open yet, but there are issues open and messages saying they are in the works, so in the meantime, since I've moved to Cosmic full time for WFM, I'm just putting things on workspaces manually and putting up with Super+left/right for now. It is a small inconvenience given that I know it is temporary.

(I find function keys are wasted by the few relatively unimportant things that operating systems and applications use them for, and that this is a much better use for them.)

KasMA1990 commented 2 months ago

I can definitely see how those features can solve the need, but I'm also curious: are people requesting these features for workspaces because they're lacking better ways to do context free navigation?

Not that those features shouldn't be there, but maybe they're also signs of a different underlying need?

brandonbeaumia commented 1 month ago

I am also strongly invested in this paradigm, as are others.

https://github.com/mkropat/jumpapp https://apps.apple.com/us/app/rcmd-app-switcher/id1596283165?mt=12 https://github.com/Soft/run-or-raise https://unix.stackexchange.com/questions/656729/wmctrl-like-tool-or-alternative-for-kde-wayland https://github.com/adrienverge/gnome-magic-window

Unfortunately, every solution I have found is either a GNOME extension or incompatible with Wayland. Having a feature that lets me set a keybinding for an application that

1) launches a specified app if it isn't running, 2) focuses the app if it is, and 3) cycles through open windows of that app if it's already focused

would be incredibly efficient. I hacked together Kanata and AutoHotkey to get custom keybinds for this on Windows at work (rather than Win+num) and this "context-free" navigation is a really great experience; I find myself missing it so much on Cosmic.

nevdelap commented 1 month ago

Update Being able to bind function keys to workspaces is supported. I don't know when that become the case, but I discovered it yesterday. You do have to manually edit the config because cosmic-settings either doesn't support it yet, or the support has a bug. I opened this yesterday: pop-os/cosmic-settings#597

There is one problem though, because each display has workspaces numbered from 1, rather being able assign workspaces to displays, it works in the context of the display that has focus.

KasMA1990 commented 1 month ago

@brandonbeaumia in your own experience, what kind of shortcuts have you preferred having? As in, do you just pick random unused shortcuts, or have you had a systematic approach to them?

brandonbeaumia commented 1 month ago

@KasMA1990 I use Kanata to reprogram my tab key to "tab when tapped, Ctrl+Alt+Shift when held," then bind that combo with letters by mnemonic (tab+F for files, tab+S for spreadsheets, etc). I also try very hard to put the bindings on the left-hand side only so I don't have to leave the mouse.

KasMA1990 commented 1 month ago

Using tab as a modifier is a pretty cool idea 😄