Single window mode in Windows

1

1

I want only one window to be maximized at a time. When I switch to a different window, the previous (or any other) window should be minimized. Mac has it, and it's called single app mode.

Using ⊞ Win + Home, I can minimize other windows, but it needs to be pressed every time. How can I do this automatically in Windows?

onlinenaman

Posted 2017-01-28T18:23:44.323

Reputation: 111

1Windows has Aero Shake feature, that will minimize all windows except the one that you shake, just click and hold on the window title bar then shake the window. To maximize the current window, just drag the window to the top border of the screen. This is the fastest way to do it in Windows, otherwise you'll need an app to do an automatic minimizing to inactive windows or so. – iSR5 – 2017-01-28T19:00:15.213

@iSR5 if you note the post, OP says he knows how he can do it manually but want something that works automatically. – LPChip – 2017-01-28T20:27:56.193

@LPChip he only mentioned using the hotkey, but not the other method that I mentioned ! So, I imagined he used the hotkeys every time and he wants a faster way to do it without pressing any keys! – iSR5 – 2017-01-28T21:42:06.093

1@iSR5 Please carefully read the question again. It clearly states "but it needs to be pressed every time. How can I do this automatically in Windows?" Shaking is still a manual action, so he clearly is not after that. – LPChip – 2017-01-28T22:41:22.493

@LPChip will do mate. Sorry for the interruption. – iSR5 – 2017-01-28T23:59:01.533

Unless I am missing something, this is a futile question. When you maximize a window, other windows are not seen, until you switch to them. So, does it matter if they are minimized or not? – None – 2017-02-04T09:37:38.750

Answers

1

There are a few ways.

Software or a script is required to do this.

I have experience with Actual Tools Window Minimizer which has a feature to automatically minimize any window upon deactivation, featuring adding exceptions and other features.

If you use Windows 10 with one monitor, you can use Tablet Mode, which automatically set any program full screen. It does not minimize other programs, but it will still feel the same. You need the anniversary update for this though. Click the notification icon to the right of the clock, and press Tablet mode. If its greyed out, make sure multiple monitors is disabled. Either set it to one of the monitors, or duplicate. Won't work with Extended.

LPChip

Posted 2017-01-28T18:23:44.323

Reputation: 42 190

1

In Autohotkey you can use SetTimer to maximize the actual active window while minimizing any other window:

#NoEnv
#SingleInstance Force

; Press F1 to enable/disable single window mode:

F1::   ; toggles the variable "enabled" between true and false
enabled := !enabled
If (enabled)
     SetTimer, single_window_mode, 10
else
     SetTimer, single_window_mode, off   ; disable single window mode
return

     single_window_mode:
If IsWindow(WinExist("A"))
{   
    WinGet, WinState_A, MinMax, A
    If (WinState_A != 1) ; the active window isn't maximized 
    {
        WinMaximize, A
        WinGet, id, list
        Loop, %id%
        {
            this_ID := id%A_Index%
            If NOT IsWindow(WinExist("ahk_id" . this_ID))
                continue
            IfWinActive, ahk_id %this_ID%
                continue
            WinGet, WinState, MinMax, ahk_id %this_ID%
            If (WinState != -1) ; the window isn't minimized
            {
                WinRestore, ahk_id %this_ID%
                Sleep 300
                WinMinimize, ahk_id %this_ID%               
            }
        }
    }
}
return

; This checks if a window is, in fact a window.
; As opposed to the desktop or a menu, etc.
IsWindow(hwnd){
   WinGet, s, Style, ahk_id %hwnd%
   return s & 0xC00000 ? (s & 0x100 ? 0 : 1) : 0
}

user3419297

Posted 2017-01-28T18:23:44.323

Reputation: 2 055

I ran this script, but it didn't work at all times. If I switch to a different window (from taskbar), sometimes the previous window didn't minimize. – onlinenaman – 2017-01-29T18:19:31.293

You can add some code to the above script to check again all the windows and minimize all but the active window (if it's important to you that all the inactive windows are minimized). – user3419297 – 2017-01-29T18:51:54.053

EDIT: I modified it a bit. Try it again. – user3419297 – 2017-01-29T19:50:17.847

1

The original available as script (AHK - AutoHotKey) or executable :

http://www.donationcoder.com/Software/Skrommel/index.html#MinimOther

MinimOther v1.1 by Skrommel

Size: 205KB

Endlessly minimizes all windows except the active one.

Features:

    ► Won't minimize dialog boxes.

Changes:

    ► 2005.12.02 - v1.1: Restores next window when current window closes.

Thanks to knyghte at DonationCoder Forum for the idea!

Guess

Posted 2017-01-28T18:23:44.323

Reputation: 11