A tiny, fast, single-file window manager for Windows โ powered by AutoHotkey v2.
- โจ Features
- ๐ธ Screenshots
- ๐ฆ Installation
- ๐ Quick Start
- ๐งฐ Detailed Features
- โ๏ธ Configuration
- ๐ ๏ธ Changelog
- ๐ฎ Roadmap
- โ Troubleshooting
- ๐ค Contributing
- ๐ License
- โญ Star History
| ๐ Single file | One .ahk script, zero dependencies |
๐งฉ Smart Tiling |
| โก Fast | No runtime framework | ๐ฅ๏ธ 9 Virtual Desktops |
| ๐ฅ๏ธ Win 7 ~ 11 | All modern Windows versions | ๐ฅง Pie Menu |
| ๐งน Low interference | Shared-computer friendly | ๐ Status Bar |
| โ๏ธ INI config | Edit and reload instantly | ๐จ 20+ Themes |
| ๐ Gradient colors | Bar, borders, PowerMenu | ๐ Clipboard History |
Two years of daily-use refinement. Built because every other Windows WM was too heavy and made my machine unusable for anyone else.
Per-element gradient backgrounds (bg), gradient text (tx), rounded corners, and span-based alignment โ each widget is independently styled via the layout string.
Gradient bg widgets with rounded corners (desktops, date, time, progress, CPU, mem, disk)
Close-up: gradient backgrounds and current-desktop highlight with rounded corners
Layout configuration in action
Configuration format: N,element,span,colors,bg|tx,on|off
BorderDrag, BorderPin, and BorderUnfocus support comma-separated gradient colors.
Drag border with gradient color
- Install AutoHotkey v2 โ https://www.autohotkey.com/
- Download
wm.ahkfrom the latest release - Run as Administrator (required for elevated windows)
Done.
Run the pre-compiled executable โ no AHK installation needed for basic use.
โ ๏ธ Pie menu customization and some advanced features require AHK v2. Running the.ahkscript is recommended.
| Action | Hotkey |
|---|---|
| ๐ Help page | Alt + / |
| ๐งฉ Tile current monitor | Alt + D |
| โ Move window (anywhere) | Alt + Left Mouse |
| ๐ Resize window (anywhere) | Alt + Right Mouse |
| ๐ Switch desktop 1~9 | Alt + 1 ~ 9 |
| ๐ฆ Move window to desktop | Alt + Shift + 1 ~ 9 |
| ๐ Move & follow to desktop | Ctrl + Alt + 1 ~ 9 |
| ๐ Toggle status bar | Ctrl + Alt + B |
| ๐พ Save layout | Alt + Shift + S |
| ๐ Restore layout | Alt + Shift + R |
| ๐งฒ Gather all windows | Alt + Shift + G |
| ๐ Window transparency | Alt + Mouse Wheel |
| ๐ Toggle always-on-top | Alt + T |
| โ Close window under mouse | Alt + Q |
| ๐ Reload script | Alt + R |
| ๐ Safe exit | Alt + F12 |
| โก Power menu | Alt + X |
| ๐ฅง Pie menu | Space + Right Mouse |
๐ก Press
Alt + /anytime โ the built-in help page lists every hotkey.
9 desktops with independent focus tracking per desktop.
| Action | Hotkey |
|---|---|
| Switch to desktop 1~9 | Alt + 1 ~ 9 |
| Move window to desktop | Alt + Shift + 1 ~ 9 |
| Move window & follow | Ctrl + Alt + 1 ~ 9 |
| Gather all windows here | Alt + Shift + G |
Hide method: minimize or transparency. Mark windows as always-visible across desktops.
[Desktop]
HideMethod=minimize ; minimize | transparencyA single hotkey arranges all visible windows on the current monitor. Layouts adapt to monitor aspect ratio โ standard (16:9/16:10), vertical (portrait), and ultrawide each get their own rules.
Default: Alt + D
[Tiling]
Gap=8
Rules=1,3,1,1/2,1;1,3,2,2/2,1/2;1,3,3,2/2,2/2;Rule format: M,N,I,X,Y
| Field | Meaning | Example |
|---|---|---|
M |
Monitor index (* = all) |
1 |
N |
Total windows on monitor | 3 |
I |
This window's index (1-based) | 2 |
X |
Horizontal span | 1 = full, a/b = segment a, (a-c)/b = segments a~c |
Y |
Vertical span | Same syntax |
Exclude windows by title, class, or process:
[Exclude]
Title=re:.*Steam.*;=Calculator
Class=AceApp
Process=devenv.exe;chrome.exeProtected tiling boundaries via SetTileBound / ClearTileBound.
Move and resize from anywhere on the window โ no need to grab the title bar.
Alt + Left Mouse โ Move
Alt + Right Mouse โ Resize
DWM frame delta compensation for pixel-accurate positioning.
8-direction radial menu on Space + Right Mouse. Items, opacity, font size, and center zone are all configurable.
[PieMenu]
SizePct=28
CenterZonePct=27
Opacity=78
FontSize=14
FontSizeActive=22Multi-monitor bar with proportional layout, gradient colors, rounded corners, and alignment control. Shows virtual desktops, clock, date, work progress, system stats, and custom text/icons.
[Bar]
HeightPct=3
Opacity=78
MonitorIdx=1
position=top ; top | bottomElement layout format (gradient + rounded + alignment):
; N,element,span,colors,bg|tx,on|off
layout=1,time,20/20,ff0000,00ff00,tx;desktops,(1-3)/20,FAB387,A020F0,bg,on;cpu,14/-20| Parameter | Values | Notes |
|---|---|---|
N |
Bar instance # (default 1) | For multi-bar setups |
element |
desktops, time, date, progress, wifi, bluetooth, battery, volume, disk, mem, cpu, custom_1..n | |
span |
a/b, a/+b, a/-b, (a-c)/b, (a-c)/+b, (a-c)/-b |
+=right-align, -=left-align, none=center |
colors |
One or more 6-digit hex (comma-separated) | Supports # prefix |
mode |
bg = colored background, tx = gradient text |
|
rounded |
on or off |
Rounded corners (bg mode) |
Span alignment โ the +/- sign controls both individual cell text alignment AND overall group position within the span:
(1-3)/20โ centered in span(1-3)/+20โ right-aligned group, text right-aligned(1-3)/-20โ left-aligned group, text left-aligned
Current desktop highlight โ set current_desktop_color with the same colors,bg|tx,on|off format to give the active desktop a distinct visual highlight:
current_desktop_color=FAB387,A020F0,bg,onAvailable elements: desktops, time, date, progress, wifi, bluetooth, battery, volume, disk, mem, cpu, custom_1..custom_n
- Colors support
#prefix:#FF0000,#00FF00 - Legacy
element:span,colorformat still compatible - Auto-hides when a fullscreen app is detected
- Pause-on-fullscreen option (
[General] PauseOnFullscreen=on) - Toggle:
Ctrl + Alt + Bยท Reload:Alt + R
Visual borders for active, dragged, pinned, and managed windows โ now with gradient color support.
| Mode | Purpose |
|---|---|
| Focus border | Highlights the active window |
| Drag border | Visual feedback during move/resize |
| Pin border | Marks always-on-top windows |
| All-window borders | Borders on every visible window |
[Border]
Mode=full ; full | top
Thickness=15
RoundedCorners=on
Radius=10
; Colors support gradients: color1,color2,...Border colors (BorderDrag, BorderPin, BorderUnfocus) support comma-separated gradient colors.
Letter-labeled overlay โ press a key to jump to that window. Scales windows down, overlays letters. Sidebar mode with configurable position. Auto-dismiss on timeout. Restores always-on-top state on exit.
[WinSelect]
SidebarWidth=200
SidebarPosition=right ; left | right
Timeout=3000Keyboard-driven dynamic tiling preview. Auto-tiles on activation, has its own border system, desktop-switch aware.
โ ๏ธ Experimental โ hotkeys disabled by default.
[WTM]
BorderMode=full
BorderFocusColor=A020F0
BorderThickness=8
Gap=10Enable it:
[Hotkeys]
WTMToggle=Alt+Shift+DEdge snapping during move and resize โ snaps to other window edges and screen edges.
[Snapping]
SnapDistance=10
SnapReleaseDistance=20Snapshot and restore all window positions, sizes, and states.
| Action | Hotkey |
|---|---|
| Save layout | Alt + Shift + S |
| Restore layout | Alt + Shift + R |
20+ built-in themes, instant hot-switching. Each defines: background, text, accent, task, border, pie menu, power menu, and WTM colors.
nord ยท tokyonight ยท dracula ยท gruvbox ยท monokai
solarized-dark ยท solarized-light ยท catppuccin-mocha ยท catppuccin-latte
onedark ยท ayu-dark ยท github-dark ยท rose-pine ยท everforest
kanagawa ยท material-deep ยท nightfox ยท palenight ยท horizon ยท oxocarbon
Switch from the system tray menu or config. Export current theme with ExportThemeToCustom().
Status bar progress bar showing how far through the workday you are.
[WorkTime]
Mode=off
WorkStart=0900
WorkEnd=1745
TaskTimes=1_1200_1300 ; Monday 12:00-13:00 (lunch)Per-weekday task slots, weekend bar option, percentage display.
Monitors clipboard changes and logs them to file. Built-in viewer for reviewing past clips. Includes 200ms debounce to suppress rapid duplicate triggers.
[Paths]
OutputDir=C:\Users\...\Documents
OutputFile=CB.txtQuick-launch terminal and editor from anywhere. Explorer integration โ get selected files, get current path.
[Paths]
VimPath=C:\path\to\your\editor.exe
TerminalExe=wt.exe ; Windows TerminalPower menu (Alt + X): shutdown, sleep, reboot. Button colors follow the active theme.
Additional features:
- ๐ฑ๏ธ System tray โ right-click for theme switch, reload, safe exit
- ๐ก๏ธ Fault isolation โ
WMGuard()wraps all operations in try/catch - ๐ Error logging โ
WMLogErr()deduplicates repeated errors - ๐ Auto config repair โ missing keys added on every startup
- ๐ Transparency โ
Alt + Mouse Wheelon any window - ๐ Always-on-top โ
Alt + T - ๐ Minimize window under mouse
- ๐ฅ๏ธ Maximize window under mouse
Other AHK scripts can show OSD messages through AHK_WM via a standard WM_COPYDATA message. No polling, no temp files โ just one function call.
Drop this function into your script:
; Show an OSD banner through AHK_WM. AHK_WM must be running.
AHK_WM_OSD(text, duration := 1000) {
DetectHiddenWindows(true)
h := WinExist("wm.ahk ahk_class AutoHotkey")
if !h
return false
payload := "OSD:" . text . ":" . duration
c := StrPut(payload, "UTF-16")
b := Buffer(A_PtrSize * 3, 0)
NumPut("Ptr", 0, b, 0)
NumPut("UInt", c, b, A_PtrSize)
NumPut("Ptr", StrPtr(payload), b, A_PtrSize * 2)
SendMessage(0x4A, 0, b.Ptr, , "ahk_id " . h)
return true
}
AHK_WM_OSD("Build passed!", 3000)See wm_osd.ahk for a ready-to-run example.
Single INI file:
%USERPROFILE%\.config\AHK_WM\wm_config.ini
| Section | Purpose |
|---|---|
[General] |
Theme, font, transparency step, pause-on-fullscreen |
[Theme] |
All color definitions (gradients supported) |
[Paths] |
Editor, terminal, clipboard log paths |
[Desktop] |
Virtual desktop count, hide method |
[Bar] |
Height, opacity, layout, alignment, rounded corners |
[Border] |
Mode, thickness, colors, rounded corners |
[Tiling] |
Gap, custom layout rules, exclusions |
[WTM] |
Keyboard tiling mode settings |
[PieMenu] |
Size, opacity, font settings |
[GUI] |
Help window & OSD preferences |
[WorkTime] |
Work hours, task slots, progress bar |
[Exclude] |
Window exclusions (title/class/process) |
[Hotkeys] |
All keybindings |
[Snapping] |
Snap distance, release distance |
[WinSelect] |
Sidebar position, width, timeout |
๐ก Edit config, press
Alt + Rto reload โ no restart needed.
- ๐ GDI handle leak fixed โ
CreateGradient()1ร1 seed bitmap was leaked on every call (up to 100/s during border drag); now properly freed - ๐ Rapid desktop-switch race fixed โ
DesktopIsSwitchingflag guardsSwitchDesktop, WTM/AllBorders ticks,TogglePin,GatherAll, andSaveLayoutStateForReload - โก Bar polling optimized โ WiFi and disk info cached for 30 s, avoiding per-second
netshsubprocess spawn andDriveGetSpaceFreeI/O - ๐ External OSD interface โ
WM_COPYDATAreceiver lets other scripts pop OSD messages; includeswm_osd_helper.ahklibrary +wm_osd_send.ahkstandalone sender - ๐งน Duplicate code extracted โ
_GetHwndUnderMouse,_RemoveFromAllDesktops,_GetTileMode,_BorderPlaceFrame,_BuildSysWidgetshared helpers - ๐งน UpdateClock table-driven โ
SysWidgetsarray replaces 7 repeated if-blocks in bar clock update - ๐งน _BuildElements unified โ
WidgetMetaMap + multi-value case fallthrough replaces 7 repeated cases - ๐จ Tiling edge gap fixed โ
Gap=0now truly flush to screen edges; DWM compensation preserved for window-to-window spacing only
- ๐ Clipboard fixed โ
RecordClipboard()was missingFileAppend; history is now actually written to file - ๐ Bar white edge fixed โ
RoundWindowExnow disables DWM non-client rendering beforeSetWindowRgn, eliminating white artifacts on Win10 19041+ - ๐ ShowWin fixed โ
SW_SHOWNA(8)โSW_RESTORE(9); minimized windows now restore correctly - ๐ Desktops white clipping โ layoutBg creation moved to
_BuildElements(same timing as other elements), resolving alignment-dependent white gaps - ๐ Span alignment โ
+/-sign in span format now controls both group positioning and text alignment - ๐ Tx mode in highlight โ
txmode correctly renders desktop labels with default color when no background is specified - ๐งน GDI leak โ task-marker bitmaps now tracked and released on bar destroy
- ๐งน Cleanup โ removed legacy globals, deduplicated INI parsing, added
Persistentdirective - โก Clipboard debounce โ 200ms filter suppresses rapid duplicate fires
- ๐ Gradient colors โ bar elements, borders, and PowerMenu now support gradient backgrounds and gradient text
- ๐ฒ Bar rounded corners โ per-element
on|offswitch for bg-mode rounded corners - ๐จ Bar layout overhaul โ new
N,element,span,colors,bg|tx,on|offformat with granular control - ๐ง Border gradient โ
BorderDrag/BorderPin/BorderUnfocussupport comma-separated gradient colors - โ๏ธ Pause-on-fullscreen โ
[General] PauseOnFullscreen=onsuspends hotkeys when gaming - ๐ Transparency step โ configurable step size, snap to multiples
- ๐งน Code cleaned โ removed legacy migration, legacy WTM globals, redundant sections
- ๐ Fixed โ bg rounded corners, single-color bg rendering, transparency minimum, help/OSD theme follow
- ๐ Config integrity check โ auto-detect missing keys & add defaults on every startup
- ๐ Pin border rounding โ now reads from config
- ๐ง DWM compensation โ extracted into shared function
- Config consolidation โ clean up two years of accumulated INI cruft
- WTM mode โ edge cases, crash recovery, multi-monitor improvements
- Per-monitor desktops โ independent desktop switching per monitor
- Package managers โ Scoop, Chocolatey, winget distribution
| Symptom | Fix |
|---|---|
| Hotkeys fail in admin windows | Run script as Administrator |
| Pie menu customization broken | Install AHK v2 (not just the .exe) |
| Games / UWP act strange | Add to [Exclude] |
| Status bar hidden by fullscreen | By design. Toggle with Ctrl+Alt+B |
| Borders look offset | Adjust Border thickness or radius |
| Remote Desktop issues | Some features differ over RDP (DWM changes) |
- ๐ Bug reports โ Open an issue with repro steps and Windows version
- ๐ก Feature requests โ Open an issue with the
enhancementlabel - ๐ง Pull requests โ Welcome. For large changes, open an issue first.
- ๐จ Themes โ Submit with a screenshot.
MIT ยฉ 2024-2026 EngineeringMechanicsB
Made with AutoHotkey v2 ยท Two years and counting






