Run (or) raise (or) cycle
Try to raise a window for a program. If none exist create one, if one is already focused and there is another cycle to the next one.
Only suports X11, XWayland may work.
This contains AI generated code.
Motivation
There are many run-or-raise script which will select a window if it is open or open the application. This is useful because you need only one shortcut to interact with an application, you don't need a separate commadn to open the program. Having a shortcut to switch to a specific application can be learned once and reused regardless of context.
However, sometimes you have multiple window for the same program. This tool deals with this situation by also cycling through windows.
Installation
You can install run-raise-cycle with pipx with
pipx install run-raise-cycle
Caveaats
We only support X11 because there appears to be no consistent way of getting window identities in wayland compositors. Wayland only supports a subset of X11's functionality
Usage
Obtain the window class:
xprop WM_CLASS
Then run
run-raise-cycle "CLASS" -- start-program
You may wish to create a shortcut in your window manager to do this. This is how you can do this from the command-line in KDE.
Alternaives and prior work
Your desktop may allow you to raise and cycle windows through it's GUI taskbar may implement this functoinality. KDE has this feature but seems to require you to click on an icon to switch. wmctrl and xdotoo can raise windwos.
There are many implementations of the run-or-raise tool.
If you using X11 then you may be able to set the class of a window when you spawn it with --class and then have a distinct binding for each instance of an application window.
Metadata
Release files for run-raise-cycle 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 |
|---|---|---|---|---|
| run_raise_cycle-1.1.1.tar.gz | 4.3 kB | Without provenance | Details for run_raise_cycle-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| run_raise_cycle-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for run_raise_cycle-1.1.1-py3-none-any.whl |
Total release size: 9.1 kB
Release files / run_raise_cycle-1.1.1.tar.gz
| Download URL | run_raise_cycle-1.1.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a7f2e693f71ea5f43a35db2d214e843229a23fec8f6e8d8c15639446d123865
|
|
BLAKE2b-256 checksum How to use checksums |
3c47268d06016f3dfb8ca768aad8515f6933a32cbefadc9a46c2d5dae4c32109
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / run_raise_cycle-1.1.1-py3-none-any.whl
| Download URL | run_raise_cycle-1.1.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2698a1bcc015174fcad3183ae51c577550a42e599feb53687064dff873c08a8c
|
|
BLAKE2b-256 checksum How to use checksums |
1ea522c5e40e2605a87027aa620e0f84b1417617fb7ced6e62572e53ab4c88e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for run-raise-cycle 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.