News for hackers. Stuff that matters.
Re:Switching from macOS to Pop_OS by Steltek on Saturday January 15, 2022 @05:34PM (#29951090)
Headed in the other direction (Linux at home to Mac at work) for years now, I can't understand what the fuss is about with Mac keyboard shortcuts. In my experience, I don't find them consistent, useful, or pleasant to use. You hit the nail on the head with alt-tab.

alt-tab is universal. Hell, alt-tab works on Android if you hook up a keyboard to it. Mac is the only thing where alt-tab falls on its face. Even if you remind yourself that you're on Mac and use cmd-tab, it cycles between apps, not windows. You need to use cmd-` for that. I often find myself in a cycle of using 3 windows across 2 apps and it drives me bonkers.

Re:Switching from macOS to Pop_OS by saurik on Saturday January 15, 2022 @05:40PM (#29951154)
> Mac is the only thing where alt-tab falls on its face. Even if you remind yourself that you're on Mac and use cmd-tab...

But alt on a Windows keyboard layout and and command on a Mac keyboard layout are the same key location, so I don't understand how you can be confused by this... maybe stop looking at the keyboard?

Re:Switching from macOS to Pop_OS by eitland on Saturday January 15, 2022 @05:58PM (#29951306)
Mac differs between switching windows and applications.

So if you work in an IDE, keep reading docs in one Firefox window and test your application in another Firefox window then in KDE or XFCE or another sane windowing system[1] - even Windows - you just use alt - tab.

On Mac you have to stop an think: Should I switch to another browser Window? Ok, that is CMD - backtick. Switch to or from IDE? That is CMD - tab.

Press the wrong combination? Now Cyberduck has entered the mix.

[1]:I was about to write Windows or Linux but starting with Unity and now also Gnome has copied this to be bug comptible with Mac

Re:Switching from macOS to Pop_OS by perryizgr8 on Saturday January 15, 2022 @10:57PM (#29953126)
Also the whole paradigm breaks down on macos if you have multiple desktops. Suppose you have one terminal open on desktop 1, and a browser and terminal on desktop 2. From the browser, if you cmd tab to switch to terminal, it will never go to the terminal on desktop 1, even if that was the last window in focus.
Re:Switching from macOS to Pop_OS by badsectoracula on Saturday January 15, 2022 @07:10PM (#29951851)
Personally i like how Window Maker does it: you can switch between all windows like in Windows, KDE, XFCE and most other floating window managers (by default on Alt+Tab) but you can also switch only between the windows of the current group (usually all windows of an application belong to the same group) or quickly toggle between the last two workspaces (what WM calls virtual desktops). The last two aren't bound to keys by default, but personally i have those set to Alt+` (sort of taken from when i used a Mac for a while) and Win+Tab respectively.

The only annoyance is that it doesn't seem to distinguish between window types so, e.g., in GIMP in multiple window mode it also cycles between utility windows like the toolbar, options, etc instead of only the image windows - though some applications do not even bother providing window hints about their window types.

Re:Switching from macOS to Pop_OS by smoldesu on Saturday January 15, 2022 @06:30PM (#29951570)
> but starting with Unity and now also Gnome has copied this to be bug comptible with Mac

This is simultaneously one of the saddest and funniest things I've read about GNOME in a while (which has a surprisingly high bar on both accounts)

Re:Switching from macOS to Pop_OS by ccouzens on Sunday January 16, 2022 @05:47AM (#29954932)
Here's how to fix it in Gnome :)

Settings -> Keyboard -> View and Customize Shortcuts -> Switch windows -> Alt + Tab

Re:Switching from macOS to Pop_OS by ccouzens on Sunday January 16, 2022 @06:03AM (#29954997)
And for completeness, on the command line

gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']"

gsettings set org.gnome.desktop.wm.keybindings switch-windows-backward "['<Shift><Alt>Tab']"

gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]"

gsettings set org.gnome.desktop.wm.keybindings switch-applications-backward "[]"

Re:Switching from macOS to Pop_OS by xenomachina on Saturday January 15, 2022 @05:51PM (#29951255)
The bigger issue is that command-tab switches between apps, not windows, and command-` switches between windows in the same app, and neither work across spaces.

I ended up installing https://alt-tab-macos.netlify.app/ which adds a keystroke that will cycle through all windows in all apps on all spaces. It's a huge improvement.

Re:Switching from macOS to Pop_OS by itazula on Saturday January 15, 2022 @06:31PM (#29951573)
Command left/right arrow, for example, switches between terminal windows in different spaces, and to terminal windows within the same space as well. Press the shift key as well to shift between tabs. (At least on my MacBook Pro's Japanese keyboard.) I don't recall have modded this behavior.
Re:Switching from macOS to Pop_OS by xenomachina on Monday January 17, 2022 @12:25AM (#29963602)
That's definitely better than command-`, thanks.

It's still not as nice as alt-tab, though. Frequently most of my windows are a mix of terminals and browser windows. I may be using several web apps and several command-line tools. Having to think about whether the application I want to switch to happens to be using the same "shell" application is not helpful.

I just want to be able to use one key to cycle through all windows in all spaces, and which lets me easily flip between the two most recent windows. Windows (and virtually every Linux DE) has had this for decades. It amazes me that macOS only recently got this, and only because of a third-party tool.

Re:Switching from macOS to Pop_OS by PostThisTooFast on Sunday January 16, 2022 @12:28AM (#29953662)
Yes, Alt-Tab is a HUGE improvement over Apple's implementation because it not only restores minimized apps as it should, but can also create a window for a running app that lacks one (with Finder being a critical example).
Re:Switching from macOS to Pop_OS by ninkendo on Sunday January 16, 2022 @01:08PM (#29958312)
Hold option as you release cmd and it will behave as you describe (opening the default window for an app with no open windows, restoring minimized apps… it’s equivalent to clicking the Dock icon for that app)
Re:Switching from macOS to Pop_OS by tom_ on Saturday January 15, 2022 @06:01PM (#29951332)
If you use the same keyboard for both, by default they end up in different places. The Mac treats the Windows key as the Command key, and the Alt key as the Option key.

(You can tweak this, if you need to, in System Preferences, Keyboard section, Keyboard tab, Modifier Keys... button.)

Re:Switching from macOS to Pop_OS by RcrdBrt on Saturday January 15, 2022 @05:42PM (#29951176)
By default GNOME has the same distinction between apps and windows and works with the backtick, too. I find it comfortable enough once you get used to it. You can do 2 different things with almost the same command (in terms of fingers position). It's only manageable with a US keyboard layout though, I give you that.
Re:Switching from macOS to Pop_OS by bryanlarsen on Saturday January 15, 2022 @05:48PM (#29951220)
I'm not sure that the grievance is necessarily that Mac shortcut keys are better, but it's that what the OP is used to. It's a pain to switch.

I'm an Emacs man. Many Emacs shortcut keys suck, but it's what I'm used to, so it's what I want.

Re:Switching from macOS to Pop_OS by nomel on Saturday January 15, 2022 @06:31PM (#29951574)
I use hyperswitch: https://bahoom.com/hyperswitch

Unrelated, I also use Hyperdock, from the same developer, to get the dock into the 21st century.

Re:Switching from macOS to Pop_OS by yokoprime on Saturday January 15, 2022 @09:23PM (#29952668)
Personally I prefer alt-tab (cmd+tab) on macOS is prefer over other operating systems. It makes it easier to work with multi window applications like browser, spreadsheets etc. If you never minimize windows, only hide them it makes life easier.