Shows the current Windows virtual desktop number in a small overlay. Includes a system tray icon with a menu item to exit the application.
MIT
1.0.0 - Initial release
- Shows the current Windows virtual desktop number in a small overlay
- Supports a transparent click-through display
- Includes a system tray icon with an Exit option
- Can be packaged as a standalone Windows EXE with PyInstaller
- Windows 10 or Windows 11
- Python 3.12+
- tkinter (included with the standard Windows Python installer)
- pystray (required for the system tray icon)
- pillow (required by pystray for tray icon image creation)
Choose one of these approaches:
Option A: install for the current user only This avoids writing to the global Python installation and is often the safest choice on managed or locked-down machines.
py -3.12 -m pip install --user pystray pillow
Option B: install globally This makes the packages available to all users of this Python installation. Depending on how Python was installed, you may need to run PowerShell as Administrator.
py -3.12 -m pip install pystray pillow
User-only install:
py -3.12 -m pip install --user pyinstaller
Global install:
py -3.12 -m pip install pyinstaller
From PowerShell in the folder containing this file:
py -3.12 .\\VirtualDesktopIndicator.py
If PyInstaller was installed for the current user only, or if you want the most reliable invocation, run it as a Python module:
py -3.12 -m PyInstaller --onefile --windowed --name VirtualDesktopIndicator .\\VirtualDesktopIndicator.py
If PyInstaller was installed globally and its command is on PATH, this also works:
pyinstaller --onefile --windowed --name VirtualDesktopIndicator .\\VirtualDesktopIndicator.py
The EXE will be created here:
.\\dist\\VirtualDesktopIndicator.exe
-
--onefile creates a single EXE.
-
--windowed prevents a console window from opening.
-
The target machine does not need Python installed.
-
If Windows Defender or startup speed gets grumpy, build without --onefile:
py -3.12 -m PyInstaller --windowed --name VirtualDesktopIndicator .\VirtualDesktopIndicator.py
That creates a folder-based app under:
.\dist\VirtualDesktopIndicator\
Fallback to user-profile installs and run tools as Python modules:
py -3.12 -m pip install --user pystray pillow pyinstaller
py -3.12 -m PyInstaller --onefile --windowed --name VirtualDesktopIndicator .\\VirtualDesktopIndicator.py