Skip to content

AdamBadkouk/Autohotkey-Desktop-Utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autohotkey-Desktop-Utils

AutoHotkey scripts for Windows 11 virtual desktop and window management.


Scripts

Virtual Desktops — AutoHotkey/VirtualDesktops/VD.ahk

Switch between and manage Windows 11 virtual desktops using keyboard shortcuts.

Requirements

Requires VirtualDesktopAccessor.dll — download the latest x64 release from: github.com/Ciantic/VirtualDesktopAccessor/releases

Place the .dll in the same folder as VD.ahk.

Hotkeys

Hotkey Action
Win + 1-5 Switch to desktop 1–5
Win + Shift + 1-5 Move active window to desktop 1–5
Win + Shift + P Toggle pin window to all desktops

**Move behavior:** By default, moving a window will follow it to the destination desktop. To stay on the current desktop instead, comment out the GoToDesktopNumber line inside the MoveTo() function.


Alt Drag & Resize — AutoHotkey/AltDrag-Resize/AltDrag-Resize.ahk

Window dragging and resizing — click anywhere in a window, no title bar needed.

Hotkeys

Hotkey Action
Alt + Left-drag Move window
Alt + Right-drag Resize window (quadrant-aware)
RButton + Left-drag Move window (desktop style)

**Resize behavior:** The corner that gets resized depends on which quadrant of the window you click in. Clicking the top-left resizes from the bottom-right, and so on. Minimum window size is capped at 100×50px.


Alt-Tab Auto-Minimize — AltTab/AltTab.ahk

Automatically minimizes the previous window when using Alt-Tab, keeping your desktop clean.

Hotkeys

Hotkey Action
Alt + Tab Switch windows and minimize the previous active window

WinKeyRemap — WinKeyRemap/WinKeyRemap.ahk

Quickly open the PowerToys Command Palette by remapping the Windows key.

Hotkeys

Hotkey Action
Windows Key Open PowerToys Command Palette (Alt + Space)

**Customization:** To use a different key, change *~LWin:: in the script to your preferred key (e.g., *~LAlt:: for Left Alt, *~Capslock:: for Caps Lock). To open a different app or shortcut instead of the Command Palette, change the Send "!{Space}" line to send the appropriate keystrokes for your desired action.


Setup

  1. Install AutoHotkey v2
  2. Clone or download this repo
  3. For Virtual Desktops, download VirtualDesktopAccessor.dll (see above)
  4. Double-click any .ahk file to run it, and add it to your startup folder: %APPDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup

Contributors