Run, raise, or cycle through application windows
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file run_raise_cycle-1.1.0.tar.gz.
File metadata
- Download URL: run_raise_cycle-1.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
450b21ed3bc885b725b56d8d4ef37e50e038783de54913d77da40a990b759b3b
|
|
| MD5 |
98f7b2e99065d398971b729c28bfb2d8
|
|
| BLAKE2b-256 |
cd1651bc4df9bc83b8637e4811f75491586ffbbe574e8b32d18a83e3da360d6b
|
File details
Details for the file run_raise_cycle-1.1.0-py3-none-any.whl.
File metadata
- Download URL: run_raise_cycle-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc2d15aec482f9478c44448398d72f640ef9666be0c34b8bb9cf0d8b61ce3da1
|
|
| MD5 |
059d72a3bbb6c4ebaa61c282378101ac
|
|
| BLAKE2b-256 |
8e69cdc9b0faff5711a4ec467f19f0aee1a245d4564a27334bb2e66a00e34f14
|