Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

run_raise_cycle-1.1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

run_raise_cycle-1.1.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file run_raise_cycle-1.1.1.tar.gz.

File metadata

  • Download URL: run_raise_cycle-1.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for run_raise_cycle-1.1.1.tar.gz
Algorithm Hash digest
SHA256 5a7f2e693f71ea5f43a35db2d214e843229a23fec8f6e8d8c15639446d123865
MD5 9c3ef5ca400dd38b7b64d44778ed8a5c
BLAKE2b-256 3c47268d06016f3dfb8ca768aad8515f6933a32cbefadc9a46c2d5dae4c32109

See more details on using hashes here.

File details

Details for the file run_raise_cycle-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for run_raise_cycle-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2698a1bcc015174fcad3183ae51c577550a42e599feb53687064dff873c08a8c
MD5 709d1436eb7c2d3d209b22179871b23f
BLAKE2b-256 1ea522c5e40e2605a87027aa620e0f84b1417617fb7ced6e62572e53ab4c88e1

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