Windows-like Minimize toggle on Dock icons

The script aims to replicate a Windows-like behavior for clicking on dock icons in macOS.
When one (1) app Window:

  1. When an app is open but minimized, clicking its dock icon will unminimize and bring the app window to the front (native in both macOS and Windows).
  2. When an app is open, frontmost and not minimized, clicking its dock icon will minimize the app window (native only in Windows).
  3. When an app is open but not frontmost, clicking it's dock icon will bring the latest app window to front (native in both macOS and Windows).
  4. When an app is not open, clicking its dock icon will launch the app (native in both macOS and Windows).

When more than one (1) app Window:

  1. For apps with multiple windows open, clicking the dock icon bring last window to the front.

This behavior is not native to macOS. By default on Mac, clicking a dock icon of a minimized app does not unminimize it, it's unhidden. The script aims to make the dock behavior more similar to the Windows taskbar, where a single click toggles the window state with the Minimize action.

Presets can be found here BetterTouchTool Preset Sharing Platform

Props to yw4z's Enhanced Dock for macOS for inspiration.

2024-10-03 at 09.38.07

Hey! Was looking for something like that for quite some time. But I see, you just recently created this script, so got lucky.... Two things, where it is not working is - when you have multiple windows open for same app. When clicking icon it is not minimizing window.... As well as not un-minimizing app at all, have to right click to get it to work. And other one - weirdly if, lets say, you close all app windows by X and app is still open (when having dot under app icon on dock), script is not opening app at all. When you click icon, it does nothing. So have to quit app for good and open again. Wonder if it is something fixable.... Anyways, Thanks for the script! :slight_smile:
P.S When importing the script, why it has two duplicate entries @ BTT? Have to disable/delete one in order to avoid getting mini menu to choose which script to run when doing left click ...

Hi Andreas, thanks for implementing this as it is very handy.
I can't get it to work however. I will admit, I am not a BTT pro but I do have another existing preset that is working.
When I import your preset I get a warning about a duplicate preset and then it imports it.
Everything seems to be set up but I don't see the expected behaviour when clicking on any Dock icon twice.
Some help would be really appreciated, thanks.

Screen Shot 2024-11-15 at 17.15.44 pm

I have the same problem.

Same issue here

the preset does import 2 copies so easy solution-just delete one! works great for me on m setup. Just find the 2 trackpad gestures, i. use 1 finger tap for mine and delete 1-should be right next to each other and both have same color tag when hovered wlll expand to say Preset-Windows Like Minimize....

Doesn't work on BTT 5.155 even if remove duplicated gestures. Please fix!

good preset though I think it has a few kinks and fixing them make it function much better. Here is a screenshot of my updated action

Works much better. This I have setup to 1 finger tap and works like a charm, The fix is simply just delete a couple things 1)the duplicate action included in preset 2) the END.IF and IF functions which are not needed and make it more complicated.. No need for second IF function because, 1st IF function states, application is not the active window or ELSE it is! Binary option. Therefore no need for another IF because our function already tells BTT that if App is not active, then open hovered app in dock ELSE minimize app

Hope that helps and thanks for original preset

Hello wynstaxxx, mind to share please? For some reason the preset isnt working for me.

yah sure i also have a version that i use know that hides instead of mminiizes…..with te expection of some apps that dont like to hide/cannot ex. finder etc. i would post right ow but BTT just blew the fuck up and its not eunning and lost everything its a mess right ow all because i upgradeed to newest mac beta last night. so hopefully i can salavage this and get back to normal and ill post it-the new an improved versins

Make a copy of ~/Library/Application Support/BetterTouchTool before trying any recovery steps.

Which macOS beta are you on?

the newest developer beta 26.5t it was the strangest thing happened once upon reboot: when BTT opened an error dialog opened stating (IIRC cant recall exactly) that my preset or store files were too old and incompatible with the current BTT version and then iBTT would terminate.

Thanks for the reminder, always save a copy of the folder and put it on desktop etc. From looking inside the store files were older. I think i was able to either find some files in the trash and restore them or can’t remember all I kow is I luckily got it back to pretty much were I was. First I had to delete all the old store whm etc files just so I could start BTT and then twent from there and luckily somehpw was able to recover the files and do a restore from backup inside of BTT.

Ill post preset in a few

Hi everyone,

I’ve been using the original Windows-like Dock minimize toggle preset and made an updated Version 2 that I wanted to share back with the community.

The goal is the same: make macOS Dock clicks behave more like the Windows taskbar. Clicking an app icon can activate, restore, or minimize the app depending on its current state.

In Version 2 I’ve made a few improvements:

  • Cleaned up the preset structure and removed duplicate trigger/action blocks.
  • Renamed the main trigger from toogleminimize to toggleDockMinimize.
  • Improved app detection using bundle ID, app path, app URL, title, description, and app name fallbacks.
  • Added better handling for apps with no windows, one window, or multiple windows.
  • Added support for restoring all minimized windows when needed.
  • Added safer activation/reopen logic for apps that are not running or have not created windows yet.
  • Added duplicate-click protection to avoid repeated accidental invocations.
  • Added fallback behavior if the script cannot complete normally.
  • Added special handling around Mission Control / Dock focus states.
  • Improved minimize behavior by trying to use the actual macOS minimize button action first, which should preserve the native animation where possible.

One note: in my setup, 1 finger tap on Dock icons works because I have that configured at the macOS/system level. The preset itself is focused on normal left-click over Dock icons. If you want the 1 finger tap behavior inside BetterTouchTool, you can add that trigger manually and point it to the same named trigger, or you can enable/configure tap-to-click at the system level like I have.

Thanks to the original preset author and to yw4z’s Enhanced Dock for macOS for the inspiration.

do you have a version to share? perhaps a link to download your version? I also have updated version been lagging on uploading a preset myself. Ill post soon. Look forward to seeing your version

Hey I'm waiting for my preset to be accepted and then i'll post the link!