steventheworker / Dock-Expos--home

Window preview app for MacOS (on the dock) using App Exposé.
https://dockexpose.netlify.app
73 stars 0 forks source link

Question - Hide/minimize a window when clicked on in the dock #13

Open Aljumaily opened 1 year ago

Aljumaily commented 1 year ago

I realized that this app is built very well and has a lot of functionalities! I am interested in one and only one functionality. It is to minimize the current focused window when clicked on in the dock. So, instead of manually hitting CMD + H, a click on the icon in the dock would do that. I kindly ask how can I achieve this.

steventheworker commented 1 year ago

This is a feature, but you need to give it "Input Monitoring" and "Accessibility" permissions (in Security & Privacy) for it to work

Aljumaily commented 1 year ago

Thank you for the quick response. I did check and both permissions are granted. I want to disable all other funcitonalites except the hide/minimize one. Here is an image of my settings:

Screenshot 2023-03-25 at 5 37 38 PM
steventheworker commented 1 year ago

I will add an "Enable Previews" checkbox next to the "Preview delay" slider. Also just letting you know, the setting unchecked in that screenshot is the setting you're referring to.

Aljumaily commented 1 year ago

Thank you for the update! I was honestly just playing with the options to test the app. When would I expect to have the ability to access the updated version!?

steventheworker commented 1 year ago

I've patched the latest version, you can just re-download v2.92 and it works.

Aljumaily commented 1 year ago

Thank you for the quick response. I have tried it multiple times and my goal hasn't been achieved. Suppose a single Safari window is open (not in fullscreen) and is minimized. Assume the desktop is showing. I want to click on Safari from the dock a single click to show it. After a second, I want to click on Safari's dock icon again and expect it to minimize the window. How could that be achieved?

steventheworker commented 1 year ago

I do plan on single click activation for minimized windows though! As that is fairly straightforward.

As for minimizing + unminimizing all windows: The biggest concern is that unminimizing a window puts it in the active space. If you click the dock icon to minimize all windows, switch spaces, and click the dock icon again, unminimizing puts all those windows in the current (wrong) space.

Working around that requires tracking what space windows are on + moving windows to the associated space, but I haven't figured either out yet, as spaces have a poor API / docs.

Also, should this feature minimize all windows in the current space (easier) or all spaces?

Aljumaily commented 1 year ago

Since it is quite involved, why not start with the simple approach and then worry about the rest in future. For me, showing/hiding the previously opened window is the priority. For example, suppose I have window A and B (both of the same app) and A is visible whereas B is hidden. Then clicking on the dock icon should hide A. Clicking on the dock window again should show A (and then hide A and show it, etc.). To perform the same action on B, I have to click and hold on the dock button to show the context menu (done by macOS by default) and click on B. Now, B is the focus. Clicking on the dock icon will show/hide B. I hope this makes sense.

steventheworker commented 9 months ago

just an update: single click activation for minimized windows will be possible in v3.00.1 (for "click" mode), as well as for hover mode (within the next two updates).

as for the other request: defaulting to minimizing (instead of hiding) everything on click ...it's totally possible to do this now, and I will look into this eventually.

dgbeecher commented 8 months ago

Hello. Thank you for this app! I see this sentence above, written about a year ago:

I will add an "Enable Previews" checkbox next to the "Preview delay" slider.

Is this still planned? I don't see it in the latest release (v3.00.4).