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.6.tar.gz (5.2 kB view details)

Uploaded Source

Built Distributions

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

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

Uploaded Python 3

pyvda-0.0.6-py2-none-any.whl (6.8 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: pyvda-0.0.6.tar.gz
  • Upload date:
  • Size: 5.2 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.6.tar.gz
Algorithm Hash digest
SHA256 164de958ead72b34217ec5b4075e5b4919d789ab0d938d8c2a73cfebe6d687c2
MD5 cc6f1f97100e4425bbf71a2a65090abd
BLAKE2b-256 4ad3aa3d36dd400e8dc6463ce2a3bac6951a5912cc44fc52a6d81f3b132412c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyvda-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8209e75bf8cc0a7eb199b91b555983daa29890345097cd56a488ad6bfc1ec381
MD5 c1bc68ca77f962ad88384b9f32d30643
BLAKE2b-256 cf8a361a036b854048b9a5ff0de19986ed7c9bcc87de707505086807349810dc

See more details on using hashes here.

File details

Details for the file pyvda-0.0.6-py2-none-any.whl.

File metadata

  • Download URL: pyvda-0.0.6-py2-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2
  • 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.6-py2-none-any.whl
Algorithm Hash digest
SHA256 89d1f82d2422d3eb9dbfaab74adffd7af35b9da460bb354d66b1e5e13eac3409
MD5 33b46e16123ce2db6e1c31c57035119a
BLAKE2b-256 549a8f1fd9b020f54932bb69d9dfa768517861315c3d19a53e0f4e460fe27bd7

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