Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10  

    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10

    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10

    George Snyder
    Published by Category: Virtualization
    17 Mar 2021
    Designer Media Ltd


    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:
    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10-2020-06-17-2112-desktops-toolbar-icons-rc.png

    Alternatively, the toolbar can be collapsed into a menu of desktop selectors. Any desktop switch takes two clicks:
    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10-2020-06-14-1202-desktops-toolbar-menu-c2.png

    Here is a summary of steps:


    1 You Will Need

    • 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.


    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.

    2 Create a Toolbar Folder

    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.

    3 Create an Initial Shortcut

    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:
    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10-2020-06-16-1256-shortcut-properties-h.png

    If using DesktopSwitcher.exe, specify a desktop index argument which is one less than the Task View desktop number. Example:
    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10-2020-06-18-1528-desktopswitcher-shortcut-properties-h.png

    You can test the shortcut by double-clicking it.

    4 Create a Shortcut for Each Desktop

    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:
    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10-2020-06-13-1646-shortcuts-folder.png

    Ctrl+c / Ctrl+v is a quick way to copy a shortcut into the same folder. Ctrl+Drag into the same folder is another.


    5 Add the Folder as a Toolbar

    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.)
    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10-2020-06-14-1202-desktops-toolbar-menu-c2.png

    6 One-Click Desktop Selectors

    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:
    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10-2020-06-14-1207-desktops-toolbar-icons-rc3.png

    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:
    Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10-2020-06-14-1214-desktops-toolbar-combo-rc.png

    7 Modifying the Toolbar

    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.


     Limitations

    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.



  1. Brink's Avatar
    Posts : 56,844
    64-bit Windows 10 Pro for Workstations build 21376
       #1

    Great job George.
      My Computers

  2. George S's Avatar
    Posts : 15
    Windows 10 Home 64 bit v.1903 b.18362.900
    Thread Starter
       #2

    Thank you for the help, Shawn.
      My Computer

  3. Brink's Avatar
    Posts : 56,844
    64-bit Windows 10 Pro for Workstations build 21376
       #3

    George S said:
    Thank you for the help, Shawn.
    You're always most welcome. Thank you for taking the time to create the tutorial.
      My Computers

  4. mojopagoda's Avatar
    Posts : 1
    windows 10 pro
       #4

    Great tip but slight kink


    Thanks, I registered to this forum just so I could say "thanks" as this tip actually worked perfectly. It's a rare experience, IMHO (usually tips are out of date by the time I find them). Anyway, one small issue I have is that despite changing the icon of the Vdesk shortcut in the folder of shortcuts (that gets used as the toolbar, etc etc) and despite that icon appearing beautifully correctly when I open the folder as a folder, nevertheless the toolbar icon is just a generic icon and not the one I have selected. This also happens if you right click on the toolbar shortcut and pull up its properties. Weird. Otherwise the shortcut works as required. (While it would be nice to have different icons, I'll be happy with the relevant numbers and text info that I have now, if necessary).
      My Computers

  5. George S's Avatar
    Posts : 15
    Windows 10 Home 64 bit v.1903 b.18362.900
    Thread Starter
       #5

    Hi mojopagoda --

    Thank you, I'm glad you found the tutorial useful. And welcome to tenforums.

    There is one correction which I have not yet had time to edit into the tutorial. It turns out that the old "vdesk.exe <n>" syntax still works. It's mentioned in a VDesk release note, but not in the documentation. So you don't need to invoke rundll32.exe, although on my system I don't see any performance difference.

    The icon problem you describe is indeed weird -- I have not seen anything like that. Some initial questions:

    1. What version of Windows 10 Pro are you using? I have access only to Windows 10 Home 1903.
    2. Are you using Windows system icons (e.g. from libraries such as SHELL32.dll), or something special?
    3. If you create a shortcut to vdesk.exe in the toolbar folder and don't change the icon, does the VDesk icon appear in the custom toolbar?
    4. Sorry but I have to ask: Have you tried rebooting the PC? That can update the icon cache.
    5. A corrupted icon cache can cause various strange problems. You could try rebuilding it (Rebuild Icon Cache in Windows 10).

    If that doesn't help, then perhaps the process which is running the toolbar (root level explorer.exe) cannot read the icon files.

    1. If you open properties from an icon in the custom toolbar and change the icon in that dialog, does the new icon appear in the toolbar? Does that change the icon in your original toolbar folder?
    2. Do your paths to icon files reference any environment variables which are not defined at system startup (i.e. not in Computer > Properties > Advanced system settings > Environment variables)?
    3. Could there be any permission issues which might prevent the root system process from reading the icon files?

    A web search for "windows 10 custom toolbar icons missing" turned up some recommendations for system checks:


    Please let us know what you find.
      My Computer


 

Tutorial Categories

Create a One-Click Toolbar to Switch Virtual Desktops in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 00:02.
Find Us




Windows 10 Forums