Showing and Minimizing a Specific Tab on Google Chrome

I routinely have at least 2 Google chrome browsers open. The one on the left has about 4 tabs open and the one on the right has only one tab open. For me and what I do, this just works.

What I would like to do is assign a macro so that I can minimize (or hide) JUST the one browser on the right (with only 1 tab open), as opposed to BOTH browsers - that's easy enough (show / hide Chrome). I just can't figure out a way to only open / minimize only ONE of the browsers. Any suggestions appreciated!

With this action it should be possible to minimize/unminimize the window of a specific app by selecting eg the name.

1 Like

Hey Todd,

Is the 1-tab browser window open to a specific site – or is it variable?


1 Like

Eureka! This is it! Brilliant - thank you!

Hi Chris! That's a really excellent question. This one in particular is open to a specific site.

In that case Frank's suggestion is the simplest answer – otherwise I'd have used AppleScript:

tell application "Google Chrome"
   set winList to windows
   repeat with theWindow in winList
      if (count of theWindow's tabs) = 1 then
         tell theWindow
            set its minimized to true
         end tell
      end if
   end repeat
end tell

Thanks for this, Chris. This looks a little complicated for us newbies though lol.

Here's the script in macro form.

Download: Minimize Google Chrome Window with Single Tab v1.00.kmmacros (5.4 KB)


Keyboard Maestro Export

  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 10.14.6
  • Keyboard Maestro v10.2