diff --git a/README.md b/README.md index 59cf709..fedb923 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo - Disable the widgets service & hide icon from the taskbar. - Hide the chat (meet now) icon from the taskbar. - Enable the 'End Task' option in the taskbar right click menu. (W11 only) +- Enable the 'Last Active Click' behavior in the taskbar app area. This allows you to repeatedly click on an application's icon in the taskbar to switch focus between multiple active windows for that application. #### Start - Disable & hide the recommended section in the start menu. (W11 only) diff --git a/Regfiles/Enable_Last_Active_Click.reg b/Regfiles/Enable_Last_Active_Click.reg new file mode 100644 index 0000000..3837213 --- /dev/null +++ b/Regfiles/Enable_Last_Active_Click.reg @@ -0,0 +1,16 @@ +Windows Registry Editor Version 5.00 + +; When clicking the icon of a a running application in the taskbar (that +; currently has multiple windows open), typically a pop-up will appear showing +; the multiple windows, and you'll have to click a second time to select the +; window you want to focus on. +; +; This registry hack instead turns the icon click into a "focus on the last +; active window" action. You can click it repeatedly to cycle focus through all +; the windows open for that application. +; +; With this enabled, the pop-up window display will still show if you hover +; your mouse over the taskbar icon. + +[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] +"LastActiveClick"=dword:00000001 diff --git a/Regfiles/Sysprep/Enable_Last_Active_Click.reg b/Regfiles/Sysprep/Enable_Last_Active_Click.reg new file mode 100644 index 0000000..bb86eba --- /dev/null +++ b/Regfiles/Sysprep/Enable_Last_Active_Click.reg @@ -0,0 +1,16 @@ +Windows Registry Editor Version 5.00 + +; When clicking the icon of a a running application in the taskbar (that +; currently has multiple windows open), typically a pop-up will appear showing +; the multiple windows, and you'll have to click a second time to select the +; window you want to focus on. +; +; This registry hack instead turns the icon click into a "focus on the last +; active window" action. You can click it repeatedly to cycle focus through all +; the windows open for that application. +; +; With this enabled, the pop-up window display will still show if you hover +; your mouse over the taskbar icon. + +[HKEY_USERS\default\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] +"LastActiveClick"=dword:00000001 diff --git a/Regfiles/Undo/Disable_Last_Active_Click.reg b/Regfiles/Undo/Disable_Last_Active_Click.reg new file mode 100644 index 0000000..09251a1 --- /dev/null +++ b/Regfiles/Undo/Disable_Last_Active_Click.reg @@ -0,0 +1,8 @@ +Windows Registry Editor Version 5.00 + +; This disables the last-active-click action for the taskbar. +; (Please see the `Enable_Last_Active_Click.reg` file for an +; explanation of what this undoes.) + +[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced] +"LastActiveClick"=- diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index bc2e5b4..0e8f138 100644 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -43,6 +43,7 @@ param ( [switch]$DisableWidgets, [switch]$HideWidgets, [switch]$DisableChat, [switch]$HideChat, [switch]$EnableEndTask, + [switch]$EnableLastActiveClick, [switch]$ClearStart, [string]$ReplaceStart, [switch]$ClearStartAllUsers, @@ -1095,6 +1096,11 @@ function DisplayCustomModeOptions { AddParameter 'EnableEndTask' "Enable the 'End Task' option in the taskbar right click menu" } } + + Write-Output "" + if ($( Read-Host -Prompt " Enable the 'Last Active Click' behavior in the taskbar app area? (y/n)" ) -eq 'y') { + AddParameter 'EnableLastActiveClick' "Enable the 'Last Active Click' behavior in the taskbar app area" + } } Write-Output "" @@ -1677,6 +1683,10 @@ switch ($script:Params.Keys) { RegImport "> Enabling the 'End Task' option in the taskbar right click menu..." "Enable_End_Task.reg" continue } + 'EnableLastActiveClick' { + RegImport "> Enabling the 'Last Active Click' behavior in the taskbar app area..." "Enable_Last_Active_Click.reg" + continue + } 'ExplorerToHome' { RegImport "> Changing the default location that File Explorer opens to `Home`..." "Launch_File_Explorer_To_Home.reg" continue