# Virtual Desktop Manager for Raycast

URL: https://www.raycast.com/sameed_majgaonkar/virtual-desktop-manager

> Manage Windows virtual desktops directly from Raycast using AutoHotkey. Brings hyprland like experience to windows.

- Install: raycast://extensions/sameed_majgaonkar/virtual-desktop-manager
- Author: [Sameed Majgaonkar](https://www.raycast.com/sameed_majgaonkar)
- Installs: 245
- Platforms: Windows
- Categories: System, Productivity
- Updated: 2026-04-24
- Source: https://github.com/raycast/extensions/tree/186d955eda64f9e956b25a3fdf5566b1d38f57f2/extensions/virtual-desktop-manager/

## Commands

- **Create Desktop & Switch**: Create a new virtual desktop and switch to it
- **View Keyboard Shortcuts**: View all available keyboard shortcuts at a glance
- **Edit Keybindings**: Customize keybindings for all commands
- **Run Keybindings Daemon**: Start or reload the background keybindings script
- **Stop Keybindings Daemon**: Stop the background keybindings script
- **Go to Desktop 1**: Switch to virtual desktop 1
- **Go to Desktop 2**: Switch to virtual desktop 2
- **Go to Desktop 3**: Switch to virtual desktop 3
- **Go to Desktop 4**: Switch to virtual desktop 4
- **Go to Desktop 5**: Switch to virtual desktop 5
- **Go to Next Desktop**: Switch to the next virtual desktop
- **Go to Previous Desktop**: Switch to the previous virtual desktop
- **Move Window to Desktop 1 & Follow**: Move the active window to desktop 1 and switch
- **Move Window to Desktop 2 & Follow**: Move the active window to desktop 2 and switch
- **Move Window to Desktop 3 & Follow**: Move the active window to desktop 3 and switch
- **Move Window to Desktop 4 & Follow**: Move the active window to desktop 4 and switch
- **Move Window to Desktop 5 & Follow**: Move the active window to desktop 5 and switch
- **Move Window to Desktop 1 (Stay)**: Move window to desktop 1 without following
- **Move Window to Desktop 2 (Stay)**: Move window to desktop 2 without following
- **Move Window to Desktop 3 (Stay)**: Move window to desktop 3 without following
- **Move Window to Next Desktop**: Move the active window to the next desktop and follow
- **Move Window to Previous Desktop**: Move the active window to the previous desktop and follow
- **Create Desktop (Stay)**: Create a new desktop but stay on current
- **Remove Current Desktop**: Remove the current virtual desktop
- **Ensure 5 Desktops Exist**: Create desktops until at least 5 exist
- **Toggle Pin Window**: Toggle pin window to all desktops
- **Pin Window**: Pin the active window to all desktops
- **Unpin Window**: Unpin the active window
- **Check Window Pinned**: Check if the active window is pinned
- **Toggle Pin App**: Toggle pin app to all desktops
- **Pin App**: Pin the active app to all desktops
- **Unpin App**: Unpin the active app
- **Check App Pinned**: Check if the active app is pinned
- **Show Current Desktop**: Show which desktop you're currently on
- **Show Desktop Count**: Show total number of virtual desktops

## README

<h1 align="center"><img src="https://github.com/raycast/extensions/raw/186d955eda64f9e956b25a3fdf5566b1d38f57f2/extensions/virtual-desktop-manager//assets/extension-icon.png" width="48" height="48" align="absmiddle" /> Virtual Desktop Manager</h1>

Manage Windows virtual desktops directly from Raycast using AutoHotkey. Brings a hyprland-like experience to Windows.

#### Screenshots

![Virtual Desktop](https://github.com/raycast/extensions/raw/186d955eda64f9e956b25a3fdf5566b1d38f57f2/extensions/virtual-desktop-manager//metadata/vd.png)
![Edit Keybindings](https://github.com/raycast/extensions/raw/186d955eda64f9e956b25a3fdf5566b1d38f57f2/extensions/virtual-desktop-manager//metadata/edit_keybindings.png)
![View Keybindings](https://github.com/raycast/extensions/raw/186d955eda64f9e956b25a3fdf5566b1d38f57f2/extensions/virtual-desktop-manager//metadata/view_keybindings.png)

#### Requirements

##### AutoHotkey v2.1-alpha.5 (Required)

This extension requires **AutoHotkey v2.1-alpha.5** or later. The standard v2.0.x versions will **not** work.

**Install via winget (Recommended):**

```powershell
winget install AutoHotkey.AutoHotkey --version 2.1-alpha.5
```

**Or download manually:** [AutoHotkey v2.1-alpha.5](https://www.autohotkey.com/download/2.1/AutoHotkey_2.1-alpha.5_setup.exe)

#### Features

##### Raycast Commands

Run these commands directly from Raycast search:

| Command | Description |
|---------|-------------|
| **Go to Desktop 1-5** | Switch to a specific desktop |
| **Go to Next/Previous Desktop** | Navigate between desktops |
| **Move Window to Desktop 1-5** | Move the active window and follow |
| **Move Window (Stay)** | Move window without switching |
| **Create Desktop** | Create a new virtual desktop |
| **Remove Desktop** | Remove the current desktop |
| **Toggle Pin Window** | Pin/unpin window to all desktops |
| **Toggle Pin App** | Pin/unpin app to all desktops |
| **Show Current Desktop** | Display current desktop number |
| **Show Desktop Count** | Display total number of desktops |

##### Background Keybindings Daemon

Run the **"Run Keybindings Daemon"** command to enable system-wide keyboard shortcuts:

###### Default Shortcuts (Numpad-based)

| Shortcut | Action |
|----------|--------|
| `Numpad 1-3` | Go to Desktop 1-3 |
| `Numpad 4-6` | Move window to Desktop 1-3 & follow |
| `Numpad 7-9` | Move window to Desktop 1-3 (stay) |
| `Ctrl+Shift+Win+←/→` | Previous/Next desktop |
| `Win+Alt+←/→` | Move window left/right & follow |
| `Alt+Numpad+` | Create desktop & switch |
| `Alt+Numpad-` | Remove current desktop |
| `Numpad 0` | Toggle pin window |
| `Numpad .` | Toggle pin app |
| `F1` | Show current desktop |
| `F2` | Show desktop count |
| `F3` | Exit daemon |

##### Customizable Keybindings

Use the **"Edit Keybindings"** command to customize all shortcuts:

1. Select any command from the list
2. Press Enter to edit its hotkey
3. Enter your custom AHK hotkey (e.g., `$#1` for Win+1)
4. Press `Cmd+S` to save and reload the daemon

###### AHK Hotkey Syntax

| Symbol | Key |
|--------|-----|
| `$` | Hook prefix (recommended) |
| `^` | Ctrl |
| `#` | Win |
| `!` | Alt |
| `+` | Shift |

**Examples:**
- `$#1` = Win+1
- `$^#Left` = Ctrl+Win+Left
- `$!+F1` = Alt+Shift+F1

#### Installation

1. **Install AutoHotkey v2.1-alpha.5**
   ```powershell
   winget install AutoHotkey.AutoHotkey --version 2.1-alpha.5
   ```
   Or [download manually](https://www.autohotkey.com/download/2.1/AutoHotkey_2.1-alpha.5_setup.exe)

2. **Install the Extension**
   - Open Raycast
   - Search for "Virtual Desktop Manager"
   - Click Install

3. **Start the Daemon**
   - Open Raycast and run "Run Keybindings Daemon"
   - The daemon will run in the background

#### Usage Tips

- **Pin frequently used windows** (like chat apps) to all desktops using `Toggle Pin Window`
- **Use the daemon** for quick keyboard navigation, and Raycast commands for less frequent actions
- **Customize your shortcuts** in "Edit Keybindings" to match your workflow
- The daemon **automatically reloads** when you save changes in Edit Keybindings

#### Troubleshooting

##### "AutoHotkey Not Found" Error

Make sure you have installed **AutoHotkey v2.1-alpha.5** (not v2.0.x):

```powershell
winget install AutoHotkey.AutoHotkey --version 2.1-alpha.5
```

Or [download manually](https://www.autohotkey.com/download/2.1/AutoHotkey_2.1-alpha.5_setup.exe)

##### Script Requires v2.1-alpha Error

You have AutoHotkey v2.0.x installed instead of v2.1-alpha. Uninstall the current version and install the alpha:

```powershell
winget install AutoHotkey.AutoHotkey --version 2.1-alpha.5
```

##### Shortcuts Not Working

1. Make sure the daemon is running (Run "Run Keybindings Daemon")
2. Check if another application is capturing the same shortcuts
3. Try reloading the daemon

#### Credits

This extension is built on top of the amazing [VD.ahk](https://github.com/FuPeiJiang/VD.ahk) library by [@FuPeiJiang](https://github.com/FuPeiJiang).

VD.ahk provides the core virtual desktop functionality for Windows, including:
- Switching between desktops
- Moving windows between desktops
- Pinning windows/apps to all desktops
- Desktop creation and removal
- And much more!

#### License

MIT License - See [LICENSE](https://github.com/raycast/extensions/raw/186d955eda64f9e956b25a3fdf5566b1d38f57f2/extensions/virtual-desktop-manager//LICENSE) for details.

#### Author

Created by [sameed_majgaonkar](https://github.com/sameedmajgaonkar)
