Skip to main content

i3 script to switch between windows in history

Project description

i3-switch

PyPI

i3 script to switch between windows in history.

This script is inspired by i3-swap-focus.

It provides a configurable history length and supports consecutive switching within the history. Besides, it can skip the closed windows, windows in scratchpad, or windows not in the current workspace.

Installation

pip install i3-switch

Configuration

Add the following lines to your i3 config file:

# Start i3-switch process
exec i3-switch

bindsym $mod+Tab exec pkill -USR1 -F "/tmp/i3-switch.pid"
# Switch in the same workspaces
# bindsym $mod+Tab exec pkill -USR2 -F "/tmp/i3-switch.pid"

To change the options for i3-switch in your i3 config:

exec i3-switch --max-len 1000 --timeout 400

Consecutive Switching

When switching before it times out, the history within the consecutive switch won't be recorded.

For example, at first the records are DCBA, after switch twice consecutively, it should become BDCA.

Internally, the process is as follows: DCBA -> CDCBA -> BCDCBA -> BDCA (cleanup after timeout). This process is necessary because the signal itself is stateless, so the state is kept in the history.

Options

Name Description Default
--max-len Max length of the window deque 100
--timeout Timeout for consecutive switching in milliseconds 500

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

i3-switch-1.2.4.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

i3_switch-1.2.4-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file i3-switch-1.2.4.tar.gz.

File metadata

  • Download URL: i3-switch-1.2.4.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for i3-switch-1.2.4.tar.gz
Algorithm Hash digest
SHA256 456c33cb91755fb2cb2ded9018dbf6e7f97f37fcf6c91ad11deb64a9c3769e7f
MD5 b79b54aa2548b9f8a4ce0b1a9dd499be
BLAKE2b-256 86e489f9e01a50e611553ac3c976cda4fa86f16d24e8cb0733c78c160e5a3f69

See more details on using hashes here.

File details

Details for the file i3_switch-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: i3_switch-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for i3_switch-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 079974ebe9c3bd258ae95f64f4859ab53b5e27e7e48c7409bccc8148448d44b2
MD5 8ff2887f81738bc04d54a5755bd76455
BLAKE2b-256 846b013a76a5d1ea1c6e1641d3d16b2bd24e4221777b7657cf0c731633ac80df

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page