Skip to main content

i3/sway script to toggle between last windows

Project description

i3-swap-focus

Requirements

Install

Recommanded way is to use a Python package installer such as uv or pipx

## Using uv
uv tool install git+https://codeberg.org/olivierlm/i3-swap-focus

## Using pipx
pipx install i3_swap_focus

i3/sway config example

exec i3-swap-focus
bindsym $mod+Tab exec pkill -USR1 -F "${XDG_RUNTIME_DIR}/swap_focus.pid"

Features

Ignore windows

To ignore some windows (e.g windows that belong to scratchpad), just mark them with ignore_focus in your config :

# Put a term in scratchpad
exec alacritty --class scratchpad_term

# i3 :
for_window [instance="scratchpad_term"] mark "ignore_focus", move scratchpad

# sway :
for_window [app_id="scratchpad_term"] mark "ignore_focus", move scratchpad

Stay in workspace

This script accepts a --stay-in-workspace flag if you do not wish to focus on a different workspace :

exec i3-swap-focus --stay-in-workspace

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_swap_focus-0.4.7.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

i3_swap_focus-0.4.7-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file i3_swap_focus-0.4.7.tar.gz.

File metadata

  • Download URL: i3_swap_focus-0.4.7.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for i3_swap_focus-0.4.7.tar.gz
Algorithm Hash digest
SHA256 976911e78c6a4263aa138463363fc0c5b05ad823c8e612d696f764bf971eba46
MD5 cdeecf414847e74bc6926d2660cd594e
BLAKE2b-256 adb7850c843808f7229ddeaeeabad2597258bc8a6c485f5c9e6ddf6fbf591969

See more details on using hashes here.

File details

Details for the file i3_swap_focus-0.4.7-py3-none-any.whl.

File metadata

  • Download URL: i3_swap_focus-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for i3_swap_focus-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 72a532bc3481b9fafddc37a7e57401a7101a977e24bb1418ce8ca1099e14bbac
MD5 3fedf0bc66ba2f5f6c44d1a6b8ef1bd7
BLAKE2b-256 9324936cf2a8c66dce9378ce6a32ec0456c3593998391e84577bde37fb79743e

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