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.4.tar.gz (5.2 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.4-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyvda-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 5370fc91a622610159559691d58e9a2ec307255c2826076fed2257c0d6a81310
MD5 d20c11c22586c0b24a4e137ab594af12
BLAKE2b-256 ede02f0761b81a2c143397bccc3610eaea1bea964499c1e4110529326e5529c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyvda-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 622e130410f65d3110a20ab0777610f752e714e3c0f4fb53dbe12473243bad79
MD5 9118da282aecdd921d608a13f52adfed
BLAKE2b-256 a8103c1a18b742fdde0c064a1fab0541d2ddb56d1be8f5f8cbf31dad77f6fafe

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