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://github.com/olivierlemoal/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
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 i3_swap_focus-0.4.6.tar.gz.
File metadata
- Download URL: i3_swap_focus-0.4.6.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de0f698378b09d05415868b2839407fb91f071993b521dfba202cd9b0493617c
|
|
| MD5 |
d28614a85feff85ed441cff156a06bd9
|
|
| BLAKE2b-256 |
bd36ad16e8b6d7a6dab8c9991ba7b2aef9e280344ca9a49a0764021ca89e087f
|
File details
Details for the file i3_swap_focus-0.4.6-py3-none-any.whl.
File metadata
- Download URL: i3_swap_focus-0.4.6-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f286a7b2aa3d82d7e3afa5defccd337aec8099df6302f02ee1bf0010c90d8f0
|
|
| MD5 |
ec8714bec265adf0fa4839964a308c75
|
|
| BLAKE2b-256 |
a00c9244ef58b588265cfd3699f6ff51b7aadf15e5276a1c28d8da737e82286c
|