Launch-on-workspace
Launch applications on a specified workspace in Linux.
The module launcher implements several useful functions that can launch (in a scriptable manner) applications on designated workspaces on X in Linux. Relies on wmctrl to manipulate windows on workspaces.
The module displays moves windows to displays in similar manner. Right now it relies on xrandr to get mapping of displays to workspace coordinates. You can use it even without xrandr by supplying the right coordinates for wmctrl by yourself.
The module custom_launchers uses the functionality of launcher to provide functions that launch specific programs. They serve as an easy abstraction from some implementation details for non-standard situations. The motivation for these is threefold:
- Some programs need carefull treatment as they (a) use some temporary window at startup and we actually want to move the second one (
texstudio), or (b) you usually have some other instances running in the system and no new process is created (firefox,Pycharm) - It simplifies supplying arguments (
terminal) - Some applications need 2 or more windows to be moved (
jupyter-lab) Currently, we have functions for launching:
gnome-terminalfirefoxjupyter_labtexstudiopycharm
All these functions return the IDs of windows they create so they can be further positioned on monitors using the functions from displays.
Installation
Requirements
tested with Gnome 3.34.1 on Ubuntu 19.10
python3 -m pip install launch_on_workspace
Usage examples
The following command launches a new window of Firefox that opens YouTube on workspace 2 (in wmctrl) which is a workspace 3 in Gnome. It is then moved to display connected to DisplayPort#1 (name "DP-1" in xrandr) and switched to fullscreen mode.
import launch_on_workspace as low
wid = low.firefox(2, "youtube.com")
low.move_win_to_display(wid, "DP-1", "full")
The following command opens a gedit on workspace 4 in Gnome
low.launch_and_move(['gedit'], 3)
Metadata
Release files for launch-on-workspace 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| launch_on_workspace-1.1.1.tar.gz | 6.9 kB | Without provenance | Details for launch_on_workspace-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| launch_on_workspace-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for launch_on_workspace-1.1.1-py3-none-any.whl |
Total release size: 15.4 kB
Release files / launch_on_workspace-1.1.1.tar.gz
| Download URL | launch_on_workspace-1.1.1.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f789dbe3036f40680db545aa83577174d6fcbf94e6ff8a1f586ae355ebe9237
|
|
BLAKE2b-256 checksum How to use checksums |
9b3ad1684921a18a3e71cbcb826c50c48e812a4ca33421ff06dbb2ae8f956dd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Release files / launch_on_workspace-1.1.1-py3-none-any.whl
| Download URL | launch_on_workspace-1.1.1-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8b1928ce2409c28453d6c820d92cd322b84a68176732f9826a182d05ab61420
|
|
BLAKE2b-256 checksum How to use checksums |
1fd515706fe986920e2d562546df47f74d40551b1a001034381f3fe9774f7b86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
|
Security for launch-on-workspace 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.