Show HN: Alt-tab-macos – Windows-style alt-tab on macOS

(github.com)

156 points | by lwouis 1647 days ago

30 comments

  • greggman2 1647 days ago
    I have never enjoyed the distinction between apps, app windows, and in app windows. 25 years of alt+tab/Ctrl+tab/cmd+tab and I still can never switch to the thing I want. My mind is stuck on one hotkey that I want to mean "switch back to the last thing I was looking at" but that doesn't work because if the last thing was another app or another tab or window in the same program then I would need a different key. My brain doesn't want to have to remember that. it just wants "back to the last active thing" whatever that thing was.

    this bite me every day for 25 years . example on desktop. I switch tabs by clicking a tab. want to back to the last tab. I do the "one" action (cmd-tab) and get a different app instead of the last tab. so it's cmd-tab again and then click the tab. Sometimes I press cmd-tab multiple times before my brain realizes I need to click a tab.

    I'm often switching between editor (or 2), terminal, browser, and apps so this idea that I have to always no the exact state I'm and deliberately consciously pick one of 3 different key combos to switch seems crazy to me.

    The same thing happens on mobile. swipe up and pick previous window is my action to get back to the previous thing so when I want to switch back to the previous tab I always without fail by swiping up and then curse that the device didn't do what I want and instead I need to click the "display tabs icon". Again I'll be juggling multiple apps so the fact that the thing I want "go back to last thing" is inconsistent always mean the ux is failing me

    • evrydayhustling 1647 days ago
      Amen. OS app/window distinction sucks because the OS doesn't really know what users experience as an app. We might have a dozen apps open inside chrome, or the same IDE configured for two massively different tasks.

      Now that users juggle not just multiple apps and windows, but tabs and accounts and devices, the OS should stop pretending it's privy to our workflow - or give us a better way to configure it.

      • greggman2 1646 days ago
        I agree the OS doesn't know what the app is doing with it's tabs/windows but the OS could mandate that it tell the OS a list of things the user should be able to switch to and design the API in such a way that we'd get a LRU behavior.

        I can dream haha.

        Just tried turning on tab support in Witch but AFAIK it can't do LRU so it's not helpful (T_T)

    • foobarian 1646 days ago
      The thing that really gets my goat is the behavior with apps spread across multiple workspaces. Alt-tabbing on one workspace does not stay on that workspace but may switch to another app's window on another workspace. End of the day, I just use my MBP for Word (oh how the tides have turned) and VPN.
      • mos_basik 1645 days ago
        Oof, I know that pain. Or a similar one. I use the tiling window manager i3 - so I don't have windows stacked on top of each other to flip through, but I do have plenty of workspaces to flip through.

        I wrote a small thing to help me manage creation and navigation of named i3 workspaces using dmenu (and I love it) but the first improvement I made was to add the ability to flip between the two most recently used workspaces and bind it to Alt-Tab. This immediately drove me up a wall by jumping to workspaces on different outputs (laptop screen, external monitor, etc) which was correct but remarkably disorienting. The next improvement was to make toggling only consider workspaces currently on the focused output. [0] I'm quite happy with the result (though there are still some bugs involving tracking workspace age while shifting them around between outputs).

        There is a further improvement I'd love to add but don't know how - I want the Windows Alt-Tab behavior where Alt-Tab enters a "switching mode" and then as long as Alt is held down, repeated tapping of Tab fires an action (in this case, cycling focus to older and older targets). I haven't been able to find a key binding program or recipe that supports this kind of interaction (I'm currently using sxhkd).

        0: https://github.com/mosbasik/fluidspaces-rs/blob/dev/src/bin/...

    • somehnguy 1646 days ago
      Exactly, this bites me almost every single day. Working in IntelliJ and using Chrome dev tools on the current tab. Switch to the browser window to look at a change, tab to dev tools and oops I'm in IntelliJ. Juggling the 3 windows I never seem to land one the one I wanted. I found the different shortcuts like you mentioned but I usually default to Cmd+Tab which is never what I want.
  • donatj 1647 days ago
    Do people know about CMD+Tilde to switch windows within an app? CMD+Tab to the App and Tilde to the Window? It’s not mentioned in the READMEs description of how macOS tab switching works, so I’m curious if the author knows.
    • deathanatos 1646 days ago
      Yes; it isn't the same. Cmd+backtick swaps only within an application; Alt+Tab on Windows is between all windows of all applications.

      Window's Alt+Tab also causes the Z-ordering of the windows to be most-recently-used. OS X's Cmd+Tab will surface all windows of a particular application to the top of the stack in their relative order, so if you have say, two browser windows, one you want and one that's been backgrounded with some long running train of thought, that (currently irrelevant) window is surface over the rest of whatever you're working on. Often I find this just gets in the way.

      The Windows model more closely matches what I as a user want; when I'm switching, I have a particular window in mind, not any window, not all windows. Alt+Tab makes that more easily accomplished than Cmd+Tab/Cmd+`.

      OS X's WM also seems to have an issue where, for whatever reason, when I Cmd+Tab to an application, it'll choose not the last active window, but one window in particular, even if that window is on a different, not focused workspace and there are windows from that application in this workspace. For whatever reason, it really likes my personal Chrome profile at work, at will switch to it at all costs, which is Grade A annoying during a presentation.

      • behnamoh 1646 days ago
        The strangest part of mission control is when you drag some window thumbnail, all of the thumbnails get smaller. If you keep doing this, they get infinitely smaller and smaller. The first time I saw this I thought it might be a bug, but after a few years it hasn't been fixed and I wonder if there is some reason for that.
    • lwouis 1647 days ago
      Author here.

      I'm familiar with this. I have rebinded these, but basically I use them everyday for tab switching, for example within 1 chrome window, of within 1 terminal window.

      The reason I made this window-switcher is that sometimes I have something I know I opened a while ago, but I don't want to think about which app holds it, then use the macOS app-switcher (command-tab) to switch to that app, then select the tab/window (with the mouse, or by cycling alt-`).

      I want a big mosaic with my windows, and instantly identify and focus on that window I remember the visual traits of.

      macOS offers exposé for that purpose, but it is unfortunately not keyboard operable. Also I prefer the Windows approach of having a the thumbnails on a timeline so my eyes have some references instead of scanning the whole screen every time with exposé.

      • pazimzadeh 1647 days ago
        I love your app, but unfortunately Control+Tab is the same shortcut used system-wide to move between tabs. Could you add the ability to choose a custom shortcut?
        • savolai 1646 days ago
          +1 for this. Now my browser experience is broken. Or is there a way to remap tab switching shortcut in firefox? Seems silly to do that though.

          Actually, alt+tab seems to do nothing on my macOS. Why not use that? I'd actually have the same shortcuts as on windows, which I also use.

          I'd also love to adjust the delay. Seems very slow now.

          Otherwise, this is beautiful.

          • pazimzadeh 1645 days ago
            Alt+tab would be amazing.
      • monting 1646 days ago
        >macOS offers exposé for that purpose, but it is unfortunately not keyboard operable.

        Agree with this. Ctrl + ↑ triggers exposé. But the windows cannot be selected with the keyboard, unlike Ctrl + ↓, which triggers exposé(?) within the current app, and one can select a window using arrow keys.

    • mFixman 1647 days ago
      That still makes it impossible to switch from a particular window of an app to a particular window of another.

      My biggest issue with Cmd+Tab is the surprise factor. Pressing that shortcut may do nothing, raise a window, raise a lot of windows, restore a minimised window, or move to another workspace; there's no way to know what will happen until you press it.

    • mollusk 1647 days ago
      I didn't, and when I tried it out, it wasn't working for me, so I looked it up and apparently others have had the same issue. [0] The Shortcut was set to cmd+` in system preferences, but it didn't do anything. Manually entering cmd+` as the shortcut fixed it.

      0: https://superuser.com/questions/186863/command-backtick-isnt...

      • fimdomeio 1647 days ago
        cmd+` It's always one of the first things I do on a new install remap to cmd+'. Little bug for international keyboards.
    • frou_dh 1647 days ago
      Somewhat related... if you're using a Mac and haven't taken the time to understand the difference between Hide (Cmd-H) and Minimize (Cmd-M) then you're missing out.
      • climb_stealth 1647 days ago
        Would you care to elaborate? I'm not an expert and minimising has always been this frustrating accidental combination where you have to use the cursor to get the window back up from the dock and command+tab doesn't work anymore.

        [0] is the first result on stackoverflow but it still seems unclear to me.

        [0] https://superuser.com/a/51775

        • frou_dh 1647 days ago
          MacOS has a much stronger distinction between applications and windows than MS-Windows does.

          The Cmd-Tab switcher deals with apps, not windows. Similarly, Hide (Cmd-H) and Hide Others (Opt-Cmd-H) operate on app(s), while Minimize (Cmd-M) operates on a window.

          When an app is Hidden, it will come back into view when you select it using the Cmd-Tab switcher.

          The gist is that people who aren't experienced with MacOS overuse Minimize and underuse Hide/HideOthers. And sadly seem prone to being obnoxious in their ignorance on the subject [0]

          [0] https://news.ycombinator.com/item?id=21256915

          • climb_stealth 1647 days ago
            Thanks, that is a great explanation! I will give it a try and see if it improves my life at work.
            • basjacobs 1646 days ago
              There is in fact a way to 'un-minimize' a window [0]: Use cmd+tab to go to the application, while still holding cmd press alt, and release cmd. It helped me out a couple of times when I accidentally minimized a window.

              [0] https://discussions.apple.com/thread/1615114

              • gt2 1641 days ago
                Worth noting that some apps un-minimize themselves. Spotify is one.
      • Fnoord 1647 days ago
        Interesting, thanks for the lesson.

        Keybinds like these are amazing with spatial design such as Finder, Nautilus, or the way Gimp worked before it went with the Photoshop redesign.

    • ymolodtsov 1647 days ago
      That shortcut doesn't work at all when you have windows of the same app scattered across multiple spaces.
    • rsync 1646 days ago
      "Do people know about CMD+Tilde to switch windows within an app? CMD+Tab to the App and Tilde to the Window?"

      I am perfectly happy with the default behavior of CMD+TAB for switching between apps - mainly because, as in every other DE, CMD+TAB has a memory and will allow you to toggle immediately between "last used". So, no matter what order the app-stack is in, you can switch to some app with CMD+TAB and then rapidly switch back and forth.

      BUT, CMD+` has no such memory. You cannot switch to a different window of an app and then rapid-fire CMD+` back and forth.

      Put simply: the behavior of CMD+` and CMD+TAB are different, but shouldn't be.

      This has been the case since forever (in my case, Leopard) and it makes me wonder what people who actually work at Apple are doing with their computers that they did not hate-fix this 11 years ago.

    • thiht 1647 days ago
      That's not really the same thing, it's a second shortcut for basically the same action. It's really not that good, it's far away from Tab and I don't ever remember that it exists. I remapped it to Option+Tab but it's not good either.
      • donatj 1647 days ago
        Far away from tab? It’s a single key up, at least on a US Qwerty keyboard.

        Update: Looking into non-us keyboards, this is way less convenient. Italian keyboards don’t even have a tilde? How do they program?

        • mfontani 1647 days ago
          alt+126 for tilde alt+123 for { (or ralt+shift+è) alt+125 for } (or ralt+shift+"+")

          ...

          hence why as a young programmer the best ever present I got from my mother was a US layout keyboard, and never looked back. With AltGr deadkeys I can even write things that are Italian, like "È", but cannot be done on an Italian keyboard (there is no such letter on the keyboard, and one has to rely on the word processing sofware to properly capitalise it if "è" comes after an end of sentence).

          Italian keyboards are shit for writing Italian, _and_ for programming.

        • aruggirello 1646 days ago
          On Windows (which I left almost two decades ago) the keyboard has always been a nightmare. Typing Alt+126 may solve the issue with tilde, but you can't possibly learn tens or hundreds of codes you might need if you happen to do any significant work on the keyboard. The Character map provides some relief, but the keyboard is a second-class citizen on Windows IMHO.

          On Linux, quite comfortably, thanks to the power of Alt modifiers (which I first got acquainted with on the Amiga), tilde is just Alt+"ì". BTW I don't have to recall ASCII codes of accented characters or leave the keyboard unless I have to type some really odd ones. I just type Alt+<accent symbol>. Thus I can type foreign words like Åland or Khazad-dûm in a fraction of a second with ease from the comfort of my keyboard...

          Würstels, crême caramel... È facile. Yes "È". Italian users on Windows always have issues typing uppercase accented characters... you can easily spot Italian Linux users by their uppercase text: PERCHÈ È COSÌ FACILE? Most (Windows) users will instead type: PERCHè è COSì. The most intrepid ones might even resort to "'" - PERCHE' E' COSI'. So sad.

          My ~2 cents.

      • diffeomorphism 1647 days ago
        > it's far away from Tab

        Wait, it is not Alt+"key above tab" by default regardless of layout (like for example in gnome)?

        • winstonschmidt 1646 days ago
          Sadly, no. I had to remap I manually to cmd+^ on my German keyboard.
        • ymolodtsov 1645 days ago
          Not on ISO keyboards, which is every European language at least.
    • rcarmo 1647 days ago
      I remap that to Option+Tab and never looked back. It's trivial to change between apps using Cmd+Tab and between individual windows "inside" the app with Option+Tab... Can't really see much point in over-engineering the solution.
    • woutr_be 1647 days ago
      I've used MacOS for almost 10 years, and I wasn't aware of cmd+`. My pain point with cmd+tab has always been that it's just switching between applications, not windows.
    • t34543 1647 days ago
      I use witch and bind it to opt-tab, very happy.
  • dvcrn 1647 days ago
    I’ve been using hyperswitch [0] for ages which does something like that. The killer feature for me is to hide windows that are not on my current desktop. I have virtual spaces for social and chats and really don’t want to ever see these windows when I’m on my programming space

    0: http://www.bahoom.com/hyperswitch

    • lwouis 1647 days ago
      Author here.

      I drew inspiration from HyperSwitch. Unfortunately, it is no longer maintained and is not free or OSS software, so I couldn't take over.

      Specifically, I wanted to improve on some points:

      * visual clarity * size of the thumbnails * size of the app icons

      It's a shame it's not on github because the customization available through the preferences is great, and the product is great overall. It's one of those projects where I'm guessing the author is making no money and could release the code without any loss. He just probably forgot about it, unfortunately

      • some_developer 1647 days ago
        I applaud this, I really do.

        I'm also worried about HyperSwitch. When I converted to OSX half a decade ago, coming from Windows, this was the one app which I needed to be able to say "I can use this machine".

        I can't comprehend how people otherwise can organize their things; it's just not my thing.

        Also Tilde-Tab is the killer; Windows really missed out here.

        I looking for a replacement for the same reason: the uncertainty of the future of this app.

        The author seems to keep it alive, but it has (or had?) timebombs and once a year the author had to release a new patch version due to this.

        I tried contact the author to throw money at it, to make sure I can have this as long as I use OSX, but he didn't really respond to that.

        However, what can I say, I still prefer HyperSwitch (HS).

        - HS is much faster "coming up", this is essential for me. I want to quickly use this. Basically I configured HS to be instant, no delay. I can live with the flashes, actually doesn't really bother me - HS supports CMD-Tab and Tilde-Tab; I need both. And in practice they work amazingly well for me. Tile-Tab is when I strictly need to jump between in-app windows. CMD-Tab can do both, in fact. Jump between apps or within the same apps window.

        Also CTRL-Tab hurts to hit combined with TAB.

        Anyway, this was on my mind for some time and there was nothing where I could mention it to similar thinking people so I already apologize if this seems inappropriate as a feedback for the hard work you put into it!

        thanks

  • temporallobe 1647 days ago
    I used to think I needed a third-party app for window switching in macOS, until I discovered Command + ` (back-tick) shortcut- which switches between windows of the sane app. Now I use it combination with Command + Tab and my workflow is so much easier. In fact, I wish Windows had this feature sometimes, but I do think Windows’ window switching is better and more intuitive.
    • PunksATawnyFill 1647 days ago
      The difference is that Windows apps are far less likely to be a mess of floating windows than Mac apps are.
    • mschuster91 1647 days ago
      For me with six different Chrome profiles, multiple Outlook windows, IDEs and messengers this is useless, as I often have to work in profile 1, then go to app 2 and then to chrome profile 3 - with hyperswitch it's simple, alt-tab until I hit the window I need. With command-backtick (which in Germany isn't the backtick but the > symbol!) it's awkward for the fingers and I would have to do cmd-tab, cmd-backtick, cmd-tab, cmd-backtick... you get the idea.
    • davidmurdoch 1647 days ago
      I don't use Mac, but do use Windows. This sounds like Windows' Alt+Tab (switches windows/apps) vs Ctrl+Tab (switches between tabs of an app). Is it not the same?
      • lwouis 1647 days ago
        * alt-tab on Windows is for finding a window within all apps. This is the one I cloned for macOS

        * alt-` on macOS or ctrl-tab on Windows is to cycle between tabs/windows of the current app

        * command-tab on macOS is to cycle between apps (the app will then elect which window to present the user)

  • ken 1647 days ago
    Despite the readme ("Fast"!), it's pretty sluggish for me. Mission Control is instantaneous, and this takes 1-2 seconds to display.

    It also doesn't seem to support any form of drag-n-drop, which is (IMHO) the huge advantage of the Mac's command-tab and Mission Control. I can drag anything to anywhere, even if I'm not seeing its eventual target yet. Nor does it seem to support command-H/Q, or play well with Spaces.

    It's cool that you made your own switcher, but in terms of everyday usability, this feels like it gives up a dozen features of the built-in one I use a hundred times a day, in exchange for one nifty new feature (view all windows + keyboard control).

    • lwouis 1647 days ago
      > it's pretty sluggish for me

      Did you take into account the 200ms that's purposefully added? The behavior of alt-tab on windows is also: if you press fast (within 200ms) you don't get a UI but the switch will happen. After holding alt for > 200ms, the UI is displayed. Taking that into account, does the UI display after a delay significantly longer than 200ms? Please open a ticket if it does, with your hardware specs.

      > It also doesn't seem to support any form of drag-n-drop

      That's a great idea! Please open a ticket

      > Nor does it seem to support command-H/Q, or play well with Spaces.

      There are 2 tickets opened currently for these 2 things. Hopefully they get implemented soon

      • mizaru 1646 days ago
        >if you press fast (within 200ms) you don't get a UI but the switch will happen

        I always get the UI, no matter how fast I press the keys (W10 1903). This may have been different on previous versions.

        • userbinator 1646 days ago
          XP and 98SE (I just started a VM to check) also don't have any delay, so I suspect that those who are seeing one are just experiencing some natural sluggishness rather than a deliberate delay.
        • lwouis 1646 days ago
          Indeed I tried and even though I can get a switch without any frame of UI showing, it is very hard to press and release fast enough. It's not a delay like I implemented, but most likely the UI being terminated before the next frame, so nothing shows.

          In any case, adding a preference to change/remove the delay will satisfy people who want the UI to show faster (https://github.com/lwouis/alt-tab-macos/issues/8)

      • ken 1646 days ago
        1-2 seconds is 5-10 times longer than 200ms, so it's probably not that.
        • lwouis 1646 days ago
          Could you possibly open a ticket for this performance issue? If you attach OS version, hardware specs, system load, it may be possible to reproduce and get to the bottom of this. Another strategy would be for you to try HyperSwitch (https://bahoom.com/hyperswitch) and see if that one is also slow (you can change the activation delay to 200ms to match, and play with thumbnail quality and see if that impacts perf).

          I worked a lot on the thumbnail generation which was making the app slow on my setup. I thought the perf is good enough, but it looks like not enough

  • rubyn00bie 1647 days ago
    I'm excited to give this a try, though I wonder if there's a way to replace command tab with it instead of control tab.

    This little bit of UX is seriously one of those things you notice in Windows, if you're primarily a Mac user, and go "holy shit, I'm missing out." Windows 10, faults aside, actually does have some pretty clever UI/UX in spots that I really wish Apple would just "steal," because it (MacOS) sort of feels like a one-button-hockey-puck-mouse sometimes.

    • K0SM0S 1647 days ago
      Wait until you discover some basic features of KDE or Gnome (especially the former) on Linux then. Using KDE, both MacOS and Windows 10 feel like it's 2009 all over again, by comparison. I just don't understand why MS and Apple don't steal the best stuff, it's literally 'free' as in beer, and so much more important to a good UX compared to the slew of useless features both these commercial vendors keep on piling up...

      Things like per-window or per-app settings:

      - borderless

      - opacity

      - default an app to a virtual desktop, position and size, even sub-types of windows (e.g. when you want children to appear in some designated place)

      - a few well-placed magnets (sides, center, other windows) to quickly resize 'perfectly' (my OCD loves it haha)

      - activities (more like a meta-organization, so powerful when switching tasks/context like home / work / hobby / etc.

      - custom shortcuts for anything (any of the above, launch any app, optionally with command-line options)

      and so much more...

      • mFixman 1647 days ago
        Don't forget always-on-top.

        I shouldn't have to install a new browser that does hacky things with OSX just to keep a YouTube video on top of my workspace.

        • rovr138 1646 days ago
          Safari PiP allows this.

          Open YouTube, start a video, right click on the video for YT’s menu, right click again and you’ll have the option for PiP.

      • lwouis 1647 days ago
        For many of the things you list, you may want to have a look at https://github.com/koekeishiya/chunkwm
        • K0SM0S 1645 days ago
          Interesting! The active project (rewrite) moved here apparently: https://github.com/koekeishiya/yabai

          Just to piggyback on your interest:

          My comments were more in the way of evangelizing Plasma (iirc KDE is the company, Plasma is their DE product), to share awesome features that I'd love to see generalized on all platforms.

          In searching for a productive DE, provided you only want GUI config on the user side and can learn to juggle between 3-4 settings panels, Plasma beats them all.

          Defaults are very close to Windows 10 (rather the other way around historically but whatever), with a touch of Linux twist here and there (magnet sides, feature-rich title bar menu, etc.)

          The more advanced stuff is only necessary to maximize X (real estate, aesthetics, shortcut-driven controls...), some of it becomes invaluable over time.

          I strongly encourage you to spend some time with KDE's Plasma, it's inspiring regarding the 'desktop paradigm' insofar as we just want to refine, not disrupt it (familiarity is a good thing for users imho).

        • motform 1647 days ago
          I cannot say enough good things about chwm (or yabai[0], as he now calls it), by far the best window management tool I've used on macOS. Unlike most other tools, it is instantaneous and requires no mental effort. In conjunction with skhd[1], it gives a super clean interface for you to completely control your desktop. It's only too bad that you have to disable SIP for all the APIs to get exposed.

          [0]: https://github.com/koekeishiya/yabai

          [1]: https://github.com/koekeishiya/skhd

      • Brometheus 1647 days ago
        MacOS has custom shortcuts for everything.
        • Legogris 1647 days ago
          Where "everything" is a small subset of KDE's capabilities.
    • lwouis 1647 days ago
      > I wonder if there's a way to replace command tab with it instead of control tab

      Check out my reply in another comment: https://news.ycombinator.com/item?id=21254933

  • etaioinshrdlu 1647 days ago
    I also like Hyperdock: https://bahoom.com/hyperdock

    It makes the Dock have windows 7 style window previews. I don't know what I'd do without it. Perhaps cry.

    • Gimpei 1647 days ago
      Also does snapping, which I can't live without.
  • nikivi 1647 days ago
    I use https://contexts.co for app switching as it supports fuzzy searching windows
    • lwouis 1647 days ago
      I considered using something like this, but as I explained in another comment (https://news.ycombinator.com/item?id=21254984), I think visual matching beats other approaches. I think the few seconds it takes to think about which app owns the window, or what text could match the window, will be longer that directly looking and visually recognizing your window. Again, this opinion is not supported by research. You may want to experiment on yourself. It is also not only about speed but the comfort of each work-flow may differ for different people.
    • keybits 1647 days ago
      I love Contexts it has some great features.

      I was over the moon to discover that it allowed me to cmd-tab to a Finder window even if it was minimised! (Native macOS cmd-tab does not raise a Finder window even though the application is running.)

      Switching between Windows of the same application without needing to resort to cmd-tilde is also nice. Lots of customisation and power user options available in the settings.

  • bpye 1647 days ago
    This is pretty awesome. Every time I end up using a Mac (normally someone else's) I always struggle with the multitasking experience. This looks a lot more familiar.
  • lbotos 1647 days ago
    It's an "old" feature, but I use "hot corners" -> mission control to switch windows: https://simplymac.com/enjoying-hot-corners-on-your-mac/

    I usually use cmd-tab when I want to close down windows for the day.

    • jdkram 1647 days ago
      You can press Q while using cmd tab to quit that app entirely without leaving the cmd tab interface, which is a fast way of cleaning up at the end of the day / when project switching.

      (apologies if this was _precisely_ what you referring to, but commenting in case you meant you then closed each app individually with cmd q, then returned to the cmd tab interface)

      A few other shortcuts for cmd tab: http://osxdaily.com/2009/11/17/secrets-of-the-command-tab-ma...

      And on the off chance anyone reading this in Windows is also jonesing for a shortcut for closing lots of apps quickly:

      Ctrl alt tab: opens persistent app switcher Ctrl w: closes the current program

  • gonzalocasas 1647 days ago
    Oh ppl, you don't know what you have until you lose it! I am unfortunately on Windows, and I miss CMD+Tab and CMD+Tilde style of switching so much. It's vastly superior in terms of reducing cognitive load.
    • delecti 1646 days ago
      Are you familiar with all the Windows Button shortcuts?

      Win+# changes to that application in the task bar (Win+1 is the app nearest the start button, etc). That lets you develop a lot of muscle memory for switching between apps if you pin things to the taskbar; for me Win+1 is always my browser, Win+2 is file explorer, and so on. Win+Up maximizes a window, Win+Left/Right docks to half the screen, Win+Shift+Left/Right moves a window between monitors.

  • monkin 1647 days ago
    Isn't just faster to use built in `ctrl + arrow` keys to manage this? You can also change shortcut.
    • lwouis 1647 days ago
      Doing command-tab, then selected an app icon, then pressing down; this UX is a drill-down approach where you already know the window belongs to a particular app, and you drill-down from there.

      I personally prefer the Windows approach where I'm shown all windows at once, in chronological fashion, and can use my performant human vision system to quickly identify the window I'm looking for. I believe that visual pattern matching beats other approaches such as thinking about which app is involved, typing first letters, etc.

      To clarify, I think that if your flow if very static, then hotkeys for you apps (e.g. command+1 -> chrome, command+2 -> terminal) is pretty optimal. I would even buy one of those dedicated keypad like a supermarket/fast-food cashier would use. Direct access is best there.

      But if your flow is more dymamic/organic; let's say you open a PDF, then work on something else, then want to focus on that PDF again; then I believe visual matching is best.

      My opinion is not based on scientific studies though, it's just my own observation, so take it with a grain of salt.

    • k__ 1647 days ago
      Is this a way to switch between multiple windows of one app?
      • pryce 1647 days ago
        command + ` on macOS is alt-tabb within the current app
      • thomaslkjeldsen 1647 days ago
        Shortcut to cycle through multiple (non-minimized) windows of one app, in either direction:

        cmd + <

        cmd + >

      • monkin 1647 days ago
        ctrl + `
  • allworknoplay 1647 days ago
    I use Witch by ManyTricks for this. I refused to get a mac until someone told me about it — I find switching to a program first and then to the correct window totally insane.

    Witch is very configurable and pretty performant — once in a while it feels sluggish but generally it’s quite good.

    Interested to try this too!

    • PunksATawnyFill 1647 days ago
      That's Apple for you. They should have abandoned the dumb one-menu-for-all-apps idea with the OS X transition, but nope. That would entail learning.

      Then again, they DID implement Command-Tab app switching from Windows... but managed to screw it up by not restoring the app from a minimized state when you switch to it.

      • zapzupnz 1647 days ago
        All I read is "blah blah blah it's not exactly the same as Windows".
        • allworknoplay 1645 days ago
          I'm sorry, you think not wanting to hit a large number of extra keys to go different app => desired window, or to have to navigate a chaotic mission control view with a mouse is just a "not exactly the same as windows" complaint?

          This entire thread exists because of people who want mac os to have a better window switching pattern.

          • zapzupnz 1645 days ago
            Actually, I was referring to this bit:

            > but managed to screw it up by not restoring the app from a minimized state when you switch to it.

            "Screw up" is interesting wording. The implication is that macOS has a fault in it because its window management is (a) app-based and (b) therefore doesn't automatically unminimise every window belonging to that app.

            Imagine you had several windows minimised for a given app, switched to that app, and they all automatically swam back out of the Dock all in the name of emulating Windows.

            Yeah, people might want a different window management system that isn't app-based, but that doesn't make the current system a "screw up" for not perfectly emulating other systems to which one may be more accustomed — namely Windows.

            Just because people aren't familiar with it or don't see the benefits in it, nothing is "screwed up" because there isn't a slavish mimicry of the way Windows does things.

            There are those of us, believe it or not, who understand the macOS way of doing things and vastly prefer it. Yeah, we might not have the most valuable input in this discussion, but that still doesn't mean the macOS way is a "screw up".

            That's the point I'm making.

      • frou_dh 1647 days ago
        Hide is for apps, Minimize is for windows. You're not derisively ranting while not even knowing what Hide is, are you?
  • SomeHacker44 1647 days ago
    How great it would be if you could replace command-tab instead of adding control-tab? Neat idea, although I do prefer the command-tab, hold command, hit Q or M or H, continue holding command and hitting tab again, etc., of macOS standard switcher.
    • lwouis 1647 days ago
      Author here.

      > replace command-tab instead of adding control-tab

      Currently there is no UI to customize hotkeys. I have a ticket to frame work that can be done here: https://github.com/lwouis/alt-tab-macos/issues/8

      However, you can switch keys in the code and get this working today. In `Application.swift` at line 16, replace

        let metaKey = 0x3B
        let metaModifierFlag: NSEvent.ModifierFlags = .control
      
      with

        let metaKey = 55
        let metaModifierFlag: NSEvent.ModifierFlags = .command
      
      
      I tested, and it overrides the default macOS app-switcher, so no need to use something like Karabineer Elements which is what I use to disable the default app-switcher in addition to add the new control-tab hotkey shortcut.

      > I do prefer the command-tab, hold command, hit Q or M or H, continue holding command and hitting tab again

      You can already hit control-tab then hold, and cycle with tab or shift-tab. What's missing is the option to hit Q/M/H.

      I have a ticket to frame work that can be done here, inspired by the creative UI of another app called WindowSwitcher: https://github.com/lwouis/alt-tab-macos/issues/9

      • bluetidepro 1646 days ago
        Sorry, I don't use Xcode often. I made the change in the code you provided above in Xcode. But now, how do I export/build the app to then drag that into my "Applications" folder with this version of the app, where it uses command-tab?

        EDIT: Google helped me out! If anyone else runs into the same thing, you do the dropdown in Xcode: Product > Archive > Distribute App (blue button) > "Copy App", and then that generates a folder with the newly created .app wherever you save it.

      • i386 1647 days ago
        You should be able to do using [NSEvent addGlobalMonitorForEventsMatchingMask] - I used it to intercept the CMD+V to make all pastes plaintext in Plain Jane

        https://github.com/i386/plainjane/blob/master/Plain%20Jane/P...

  • aasasd 1647 days ago
    I'm using HyperSwitch that has the same feature, only on alt-tab. But! It also replaces the cmd-backtick shortcut with a similar overlay for the current app's windows. I find that great, because the native Mac order of switching windows is bonkers, while HyperSwitch employs the last-used order.

    The alt-tab feature in HS also has a flaw: if you switch to an app via the dock icon (or possibly by clicking on one of its windows), all windows of that app become ‘recently used’ in the alt-tab menu. I'm guessing this might be a behavior of MacOS, and that you might run into the same problem.

    • lwouis 1647 days ago
      > The alt-tab feature in HS also has a flaw: if you switch to an app via the dock icon (or possibly by clicking on one of its windows), all windows of that app become ‘recently used’ in the alt-tab menu. I'm guessing this might be a behavior of MacOS, and that you might run into the same problem

      I'll test this, thanks for the heads up! Windows recently used order comes from the OS in my current implementation (I'm not spying on the whole system and keeping track; the OS is giving me a list of most-recent first windows). That may indeed affect my app too

  • oneplane 1646 days ago
    Odd what things people seem to have issues with. I've never had any problem with application and window management on either platform, be it keyboard based or mouse based.

    I suppose for some people there has to be 'one true way' of managing windows and applications and every other way that isn't their way is automatically no good. But for me that hasn't really been the case. I like some versions more than others, but it doesn't really affect the way I work or the efficiency I work at.

  • monster2control 1647 days ago
    I’m not sure what your talking about alt-` switches between app windows. The windows switcher is dreadful, it clumps all your windows in sorted and you can’t easily swap back and forth between two apps. On macOS, command tabbing nicely flips back and forth between the last used window. Windows never seems to make it easy to switch in my opinion.
  • pcr910303 1647 days ago
    Great, it'll be immensely useful for me. I would appreciate more if the layover looked more like macOS. Currently the corners are too sharp compared to the macOS default ones, and the text is white compared to the less standing-out grey.

    Nonetheless, the idea is great and I think I'll switch to it right away!

  • imkieren 1647 days ago
    I like this idea a lot, just tried it now however and the UI is a bit too slow for how fast I like to switch between apps, espically on multiple desktops - takes about a second to show up and swaps to the active monitor instead of staying on the main like command+tab does. Will follow this!
    • lwouis 1647 days ago
      For the slowness, could you please check my reply here: https://news.ycombinator.com/item?id=21256353

      For the active monitor issue, I have never tested on multi-monitors (I personally switched back to single-monitor after years of multi). Could you please open a ticket? It may be an easy update

    • dplgk 1647 days ago
      There's an app called Witch that might suit your needs.
  • 29athrowaway 1647 days ago
    Mission Control dashboard + Reduce motion accessibility setting = the best window switcher
    • lwouis 1647 days ago
      Unfortunately Mission Control is not keyboard-accessible :/
  • fortran77 1647 days ago
    Wow! I remember when Windows users would try to put Apple-style features on Windows. (Interestingly, the "dock" was first on Windows, with StarDock, etc, before OSX had theirs).
    • lwouis 1647 days ago
      I've spent years on windows, mac, linux. I remember in my youth adding a dock with the fisheye effect on hover on Windows XP. What a blast that was :p

      Nowadays i'm into workflow optimization and this alt-tab window-switching is what i found best in my personal study

    • PunksATawnyFill 1647 days ago
      Meanwhile, Mac users STILL don't get a real Delete key; they get a Backspace key mislabeled "delete."
      • zapzupnz 1647 days ago
        It's been called Delete on Macs since day 1. What you call the 'Delete' key, Mac users call 'Forward Delete'.
        • fortran77 1646 days ago
          Mac users are nuts! I don't know how they can get anything done.
  • eddyg 1647 days ago
    I’ve been using HyperSwitch [1] and love it, but will give this a look...

    [1] https://bahoom.com/hyperswitch

  • seltzered_ 1646 days ago
    https://github.com/numist/Switch was a very similar app made a few years ago.
  • pazimzadeh 1647 days ago
    How do you change the delay for showing the UI?

    > Delay before showing the UI to avoid flashing (default 200ms)

    What's flashing?

    Have you thought about enabling going backwards by pressing ` while control is held down?

    • cgijoe 1647 days ago
      I believe OP means that if you press Alt+Tab and release the keys quickly, it'll simply swap to the last window without showing ("flashing") any UI overlay at all.
      • userbinator 1647 days ago
        The Windows one doesn't --- at least on XP, that is; Alt+Tab causes the switch window to show up the instant it's pressed.

        The delay may be the reason others here are noticing that it's "slow".

        • withinrafael 1647 days ago
          Neither does the switcher on Windows 10.
    • lwouis 1646 days ago
      You can change this line: https://github.com/lwouis/alt-tab-macos/blob/6b5e426e05d47c2...

      from 0.2 to whichever delay you want in seconds (0 is valid)

  • mhd 1647 days ago
    Is OS 9 single-app mode still an option on Mojave+? It used to work a few versions ago with a hidden setting, but doesn't seem to work like that anymore.
  • arvinsim 1646 days ago
    If I can emulate MacOS workspace shortcuts on Windows, I would use it a lot more.

    Muscle memory is sometimes a curse.

  • K0SM0S 1647 days ago
    I'm curious, why copy from Windows 10 instead of e.g. KDE (Plasma) which has so much more features and such a better UX overall?
    • lwouis 1646 days ago
      When I was on Linux I always used i3, so I'm not familiar with KDE. Could you please elaborate on these extra features and how the UX is better?
      • eitland 1646 days ago
        Different strokes for different folks I guess.

        Personally I love KDE (install Neon, mostly leave it alone, as it os perfect for me).

        Other people will be happy with KDE because they can customize it to their hearts content. You can even make KDE look and work like MacOS if you want.

        Other people (notably a number here on HN) will immediately start commenting about how there are too many options in KDE and how the developers should rather fix some jarring alignment issues that people like me cannot see.

        Don't worry too much about us KDE users. You've already made my day better just by trying to fix one of the things that made me give up Mac after three years of trying.

  • ComputerGuru 1647 days ago
    That’s funny. I wrote a utility to bring macOS-style window switching for Windows 10 a few years ago: https://neosmart.net/blog/2017/easy-window-switcher/

    (Don’t worry, it’s still updated and maintained.)

    Also submitted as another Show HN, somewhat tongue-in-cheek, because why not? https://news.ycombinator.com/item?id=21255305

    • rjblackman 1647 days ago
      thanks I've been looking for something like this. once you understand the cmd-tab, cmd-` behaviour from macos, you realize microsoft made the wrong ui decision with their alt-tab.
      • kristiandupont 1647 days ago
        This is certainly not the realization that I have reached.

        To me, "app" is an arbitrary grouping that I don't really care about. I have little mental projects in my head with a couple of windows related to them. That could be a browser window and an instance of vscode. The fact that I might have another set of windows that happen to use those same apps doesn't mean that I want them to pollute my z-index when switching back and forth.

        Yes, I know about spaces or multiple desktops or whatever but for some reason those don't sit will with me.

    • monster2control 1647 days ago
      This is awesome. I’ve been wishing for something like this on Windows!!
  • PunksATawnyFill 1647 days ago
    How about fixing the problem where Apple doesn't restore the minimized app when you switch to it?

    Kind of defeats the purpose of tabbing through apps in the first place, when you leave it minimized in the dock after you switch to it.

    DUHHHH Apple.

    • oneplane 1646 days ago
      That's what hide is for. cmd+h hides the app+windows, going back to it immediately restores all of it.