Skip to main content

Python implementation of the VirtualDesktopAccessor for manipulating Windows 10 virtual desktops.

Project description

py-VirtualDesktopAccessor

Implements a subset of the functionality offered by https://github.com/Ciantic/VirtualDesktopAccessor, written in pure Python and installable via pip.

pip install pyvda

Usage

The following functions are implemented. The only deliberate difference with the behaviour of Ciantic's original DLL is that desktops here are 1-indexed, as this reflects the numbers shown in the task view.

def GetCurrentDesktopNumber() -> int:
def GetDesktopCount() -> int:
def MoveWindowToDesktopNumber(hwnd: int, number: int) -> None:
def GoToDesktopNumber(number: int) -> None:
def GetWindowDesktopNumber(hwnd: int) -> int:

Example usage:

import pyvda
import win32gui

number_of_active_desktops = pyvda.GetDesktopCount()
current_desktop = pyvda.GetCurrentDesktopNumber()

current_window_handle = win32gui.GetForegroundWindow()
pyvda.MoveWindowToDesktopNumber(current_window_handle, 1)

pyvda.GoToDesktopNumber(3)

window_moved_to = pyvda.GetWindowDesktopNumber(current_window_handle)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvda-0.0.5.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvda-0.0.5-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pyvda-0.0.5.tar.gz.

File metadata

  • Download URL: pyvda-0.0.5.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for pyvda-0.0.5.tar.gz
Algorithm Hash digest
SHA256 e6f5ed541bdd1fae061673bace9699fedcf5ba5cdb9e6c989ea38e8cf0c79552
MD5 ca1c6b5e6426b51cd9bac4710a8fe0d1
BLAKE2b-256 234ab98caed813de3ed5815d391f65513046b8b1ce674000d1c107e3d222bade

See more details on using hashes here.

File details

Details for the file pyvda-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pyvda-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for pyvda-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c4d9ab37e1699c58707bd7967c956940b5213a8a3dca187a926a624adea3e9f7
MD5 40a416d096e4a91b0189f7db6bda306e
BLAKE2b-256 5c10b8b29e89bfdab9f93706a42a2035d6640a819e75bce8fdd1fdbc64c86f86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page