Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mrob95 committed Apr 4, 2021
1 parent a33350d commit 4b1f058
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# py-VirtualDesktopAccessor
# Python Virtual Desktop Accessor
Python module providing programmatic access to most of the settings accessed through the [Windows 10 task view](https://en.wikipedia.org/wiki/Task_View).
Including switching virtual desktops, moving windows between virtual desktops, pinning windows and listing the windows on a desktop.

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

## Installation
```
Expand Down Expand Up @@ -30,15 +32,4 @@ AppView.current().pin()
```

## Documentation
Full API documentation can be found at

## Tips

Sometimes, after calling `GoToDesktopNumber` the focus will remain on the window in the previous desktop. This is at least partially fixed by calling:
```
from ctypes import windll
ASFW_ANY = -1
windll.user32.AllowSetForegroundWindow(ASFW_ANY)
```

before any call to `GoToDesktopNumber`.
Full API documentation can be found at [Read the Docs](https://pyvda.readthedocs.io/en/latest/index.html)
3 changes: 3 additions & 0 deletions pyvda/desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ def go(self, allow_set_foreground: bool = True):
windll.user32.AllowSetForegroundWindow(ASFW_ANY)
self._manager_internal.SwitchDesktop(self._virtual_desktop)

# TODO: List windows on this desktop?
# would be similar to get_by_z


def get_virtual_desktops() -> List[VirtualDesktop]:
"""Return a list of all current virtual desktops, one for each desktop visible in the task view.
Expand Down

0 comments on commit 4b1f058

Please sign in to comment.