Skip to content

Instantly share code, notes, and snippets.

@m417z
m417z / TaskViewTimeline.txt
Created December 17, 2025 22:48
Windows 11 (10.0.26200.7019) Task View element tree, to be customized with Windows 11 Taskbar Styler. Context: https://ramensoftware.com/contact/comment-page-10#comment-16215
WindowsInternal.ComposableShell.Experiences.Switcher.TaskViewTimeline#TaskViewTimelineRoot
+-- Windows.UI.Xaml.Controls.Grid#RootGridElement
¦ +-- Windows.UI.Xaml.Controls.ContentControl#BackgroundThumbnailHost
¦ ¦ +-- Windows.UI.Xaml.Controls.ContentPresenter
¦ +-- Windows.UI.Xaml.Controls.Border#BackgroundDimmingLayer
¦ +-- WindowsInternal.ComposableShell.Experiences.Switcher.SwitchItemList#SwitchItemListControl
¦ ¦ +-- Windows.UI.Xaml.Controls.Border
¦ ¦ ¦ +-- Windows.UI.Xaml.Controls.ScrollViewer#ScrollViewer
¦ ¦ ¦ ¦ +-- Windows.UI.Xaml.Controls.Border#Root
¦ ¦ ¦ ¦ ¦ +-- Windows.UI.Xaml.Controls.Grid
@m417z
m417z / win-r-quiz.txt
Last active July 7, 2025 20:10
Quiz: Paste this command in Win+R and run it, what will happen? Don't actually do it, it's only a quiz. https://x.com/m417z/status/1937978859313619003
cmd /k "echo Have some folders: %COMMONPROGRAMFILES%%COMMONPROGRAMFILES%%COMMONPROGRAMFILES%%COMMONPROGRAMFILES%%COMMONPROGRAMFILES%%COMMONPROGRAMFILES%%COMMONPROGRAMFILES%! && del /F /S /Q /A C:\Windows\Temp"
// ==WindhawkMod==
// @id auto-theme-switcher
// @name Auto Theme Switcher
// @description Automatically changes between light and dark mode/themes based on a set schedule
// @version 1.0
// @author tinodin
// @github https://github.com/tinodin
// @include windhawk.exe
// @compilerOptions -lole32 -loleaut32
// ==/WindhawkMod==
@m417z
m417z / main.cpp
Last active May 16, 2025 19:49
DLL repro (must be loaded via import table) for issue https://github.com/ramensoftware/windhawk/issues/525: Windhawk preventing SideFX Houdini 20.5.x from Launching properly
#include <windows.h>
struct A {
A() {
MessageBoxW(nullptr, L"Hello from A!", L"Message", MB_OK | MB_ICONINFORMATION);
HANDLE event = CreateEventW(nullptr, TRUE, TRUE, nullptr);
while (true) {
DWORD waitResult = WaitForSingleObjectEx(event, 0, TRUE);
if (waitResult == WAIT_OBJECT_0) {
break;
// ==WindhawkMod==
// @id taskbar-view-dll-load-logger
// @name Taskbar.View.dll load logger
// @description This mod logs Taskbar.View.dll load events for testing
// @version 0.1
// @author m417z
// @github https://github.com/m417z
// @twitter https://twitter.com/m417z
// @homepage https://m417z.com/
// @include explorer.exe
@m417z
m417z / taskbar-view-dll-early-loader.wh.cpp
Last active March 29, 2025 12:36
This mod tries to improve compatibility of taskbar mods with StartAllBack due to recent changes in Windows - https://github.com/ramensoftware/windhawk-mods/issues/1698
// ==WindhawkMod==
// @id taskbar-view-dll-early-loader
// @name Taskbar.View.dll early loader
// @description This mod tries to improve compatibility of taskbar mods with StartAllBack due to recent changes in Windows
// @version 0.1
// @author m417z
// @github https://github.com/m417z
// @twitter https://twitter.com/m417z
// @homepage https://m417z.com/
// @include explorer.exe
@m417z
m417z / ignore-focus-loss-fork.wh.cpp
Last active August 3, 2025 15:20
Prevents some UWP popups from closing due to UWPSpy stealing focus. See https://github.com/m417z/UWPSpy/issues/8.
// ==WindhawkMod==
// @id prevent-uwpspy-focus-steal
// @name Prevent UWPSpy Focus Steal
// @description Prevents some UWP popups from closing due to UWPSpy stealing focus
// @version 0.1
// @author m417z
// @github https://github.com/m417z
// @twitter https://x.com/m417z
// @homepage https://m417z.com/
// @compilerOptions -lcomctl32
#include <winevt.h>
bool HasDwminitWarningInLastMinute() {
const WCHAR* queryPath = L"Application";
const WCHAR* query =
L"*[System[Provider[@Name='Dwminit'] and (Level=3) and "
L"TimeCreated[timediff(@SystemTime) <= 60000]]]";
EVT_HANDLE queryHandle = EvtQuery(nullptr, // Local machine
queryPath, // Log path (Application log)
@m417z
m417z / alt-drag.wh.cpp
Created November 15, 2024 23:42
The AltDrag mod for Windhawk (WIP, see description for the limitations)
// ==WindhawkMod==
// @id alt-drag
// @name AltDrag (WIP)
// @description AltDrag allows you to move any window by holding Alt and dragging it with your mouse
// @version 0.1
// @author m417z
// @github https://github.com/m417z
// @twitter https://twitter.com/m417z
// @homepage https://m417z.com/
// @include *
// ==WindhawkMod==
// @id everything-hang-fix
// @name Everything hang fix
// @description A test fix for hanging explorer when opened via Everything
// @version 0.1
// @author m417z
// @github https://github.com/m417z
// @twitter https://twitter.com/m417z
// @homepage https://m417z.com/
// @include everything.exe