How To Build a One-Click Toolbar To Switch Virtual Desktops
For most of my career I used virtual desktop selector grids with 12 to 16 desktops on X-Windows and Windows 9x, XP, and 7. Selecting a desktop required only one click. Some selectors supported desktop names, a convenience when using a fixed set of desktops dedicated to specific activities. In comparison, the Windows 10 Task View desktop selector feels cumbersome. For starters, the button to open the selector is at the opposite edge of the screen. And if the selector is wide enough to require a scrollbar, then selecting a desktop can take up to five clicks/hovers/moves.
There are several free utilities which enable you to select a desktop by pressing a key combination, but they require you to remember which desktop number is being used for each activity.
I decided to create a toolbar which can switch to any of my 12 Task View desktops with one click. Each desktop's icon can indicate its purpose, and its name+comment will display as a tooltip:
Alternatively, the toolbar can be collapsed into a menu of desktop selectors. Any desktop switch takes two clicks:
Here is a summary of steps:
- Windows 10 Home or Pro. Earlier versions do not have Task View.
One of the following, which the toolbar shortcuts invoke to perform a desktop switch. Both are fast, and neither flashes a command window. There may be similar utilities which did not turn up in my searches.
- VDesk (download and install VDeskSetup.msi).
- DesktopSwitcher (download DesktopSwitcher.exe).
I prefer VDesk, because it does not flash a taskbar icon, and it takes the Task View desktop number on its command line. If that desktop does not exist, then VDesk creates it, which could be useful if you create and delete desktops frequently. However, for our usage it requires a dummy executable to invoke. It briefly flashes a "busy" cursor.
DesktopSwitcher is a minimalist choice. It is smaller, has no other function, and does not require a dummy executable. Its desktop argument is an index (one less than the desktop number), and it briefly flashes a taskbar icon. If the specified desktop does not exist, it does nothing.
The toolbar is constructed as a new folder containing a shortcut for each virtual desktop number. All shortcuts will point to the same executable, but with different command line options.
The new toolbar folder can be anywhere; I put mine on the desktop. You could name it something boring like "Desktops", but I named mine "][][" (square brackets), to conserve taskbar space and to resemble the Task View button sideways.
In the new folder, create a shortcut to VDesk.exe or DesktopSwitcher.exe and edit the shortcut's properties. Give the shortcut a name and icon to indicate its purpose. The name appears as a tooltip, with the comment (if not blank) as a second line. Running the shortcut minimized is optional for these executables, but is generally recommended.
Choose simple icons. Details in the tiny toolbar images can be hard to differentiate.
If using VDesk.exe, you must specify an "on:" argument for the desktop number, and a "run:" argument to specify an executable. We don't want to run a command, so specify rundll32.exe to act as a no-op. With no arguments it does nothing, and it does not flash a command window. Example:
If using DesktopSwitcher.exe, specify a desktop index argument which is one less than the Task View desktop number. Example:
You can test the shortcut by double-clicking it.
For each additional desktop, copy the initial shortcut and change the copy's name, icon, and desktop number. Changes in the shortcuts are automatically reflected in the toolbar, so later corrections and additions are easy. My completed toolbar folder looks like this:
Ctrl+c / Ctrl+v is a quick way to copy a shortcut into the same folder. Ctrl+Drag into the same folder is another.
To create the new toolbar, click right on the taskbar background and select Taskbar > Toolbars > New toolbar..., then navigate to the folder containing your shortcuts and click Select Folder. This creates a toolbar menu on the right. To switch to a desktop, click the '»', then the menu item.
If you want to move the new toolbar next to the Task View button, turn OFF Taskbar > Lock the taskbar, and drag the toolbar's handle to the far left. Then drag the taskbar icon's handle left to collapse the toolbar to just its name again. (For details, see Section 3 Moving Taskbar Toolbars in Taskbar Toolbars - Creating and naming, customising, moving.)
To get single-click desktop selector icons, click right on the toolbar title or background (below its icons) and turn OFF Toolbar > Show Title and Toolbar > Show Text. Then expand the toolbar rightwards to show its icons. Hover over an icon to show its tooltip, or click on it to switch desktops:
If you need to save space, you could expand the taskbar to two rows, or move the taskbar to the left or right side of he desktop. Alternatively, you could expand the toolbar part way to get some single-click icons and an overflow menu:
Changes to a shortcut in the toolbar folder are automatically reflected in the toolbar. Alternatively, you can click right on a toolbar icon and select Properties to edit the shortcut (including its name, on the General tab).
If a shortcut modification changes the order of toolbar icons, you can re-sort them. Unlock the taskbar, and narrow the toolbar to expose the '»' button. Click on '»' to open the menu, click right on a menu item, and select Sort by Name. Then return the toolbar to its desired width.
While the taskbar is unlocked, you can drag the toolbar icons into any order desired.
The toolbar makes it easy to associate an activity with each desktop, and to switch quickly between desktops. However, you still must use the Windows Task View desktop selector to see the current desktop number, to preview what's on a desktop, or to move windows between desktops.
After switching to a desktop, no window has focus. That leaves your Alt-Tab list unchanged, but you have to click on a Window before typing anything.
The toolbar is static, so users who create and delete desktops frequently may find it less useful. Even then, a toolbar with just desktop numbers could save a few clicks. If you click a toolbar icon whose desktop number does not exist, then VDesk creates desktop(s) up to that number.
These shortcut names are not connected to Windows Task View virtual desktop names, which may become available in 2020.
Related Tutorials
- How to Open Task View in Windows 10
- How to Switch Between Virtual Desktops in Windows 10
- How to Add Toolbars on the Taskbar in Windows 10
- How to Rename Virtual Desktops in Windows 10
- How to Change Virtual Desktop Background in Windows 10