i3-focus-group
Create a group for i3/sway containers to easily switch focus between.
Installation
Using pip:
pip install i3-focus-group
If you are using Nix, you can install it from NUR.
Usage
i3-focus-group will listen at a Unix domain socket for incoming requests. Each request includes a single line of string as the name of command.
The following commands are supported:
| Command | Description |
|---|---|
| add | Add the current container to the group |
| remove | Remove the current container from the group |
| toggle | Toggle the current container (add or remove) |
| clear | Clear the group (remove all containers) |
| switch | Focus next container in group and promote this container if in group |
| peekNext | Focus next container in group but without changing order |
| peekPrev | Focus previous container in group but without changing order |
You can use any program that supports Unix domain socket to send the request. For example:
echo "add" | socat - $XDG_RUNTIME_DIR/i3-focus-group.sock
echo "switch" | socat - $XDG_RUNTIME_DIR/i3-focus-group.sock
To use it with i3/sway, simply add keybindings to run the above commands:
bindsym Mod4+Tab exec echo "switch" | socat - $XDG_RUNTIME_DIR/i3-focus-group.sock
bindsym Mod4+grave exec echo "toggle" | socat - $XDG_RUNTIME_DIR/i3-focus-group.sock
bindsym Mod4+Shift+grave exec echo "clear" | socat - $XDG_RUNTIME_DIR/i3-focus-group.sock
bindsym Mod4+comma exec echo "peekPrev" | socat - $XDG_RUNTIME_DIR/i3-focus-group.sock
bindsym Mod4+period exec echo "peekNext" | socat - $XDG_RUNTIME_DIR/i3-focus-group.sock
For more command-line options, run i3-focus-group -h.
Example
- To start with, the group with be empty.
- Then suppose two containers A, B, and C are added to the group and now C is focused.
The group becomes
[C] B A. (bracket means current focus) - Suppose
switchcommand is issued, it will focus on the next container B and promote it to the head. The group becomes[B] C A. - Suppose
switchcommand is issued again, the group will become[C] B A. - Suppose
peekNextis issued. The focus will change to B but without promoting the container. The group becomesC [B] A. - Suppose
peekNextis issued again. The focus will change to A. The group becomesC B [A]. - Suppose
switchis issued next. A will be promoted first and focus will switch to the next container C. The group becomes[C] A B.
If the current focus not in the group, the next switch or peek command will focus on the first container in the group.
License
i3-focus-group
Copyright (C) 2024 DCsusnet
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Metadata
Release files for i3-focus-group 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| i3-focus-group-0.1.5.tar.gz | 16.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| i3_focus_group-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.6 kB
Release files / i3-focus-group-0.1.5.tar.gz
| Download URL | i3-focus-group-0.1.5.tar.gz |
|---|---|
| Size | 16.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3dd72e4610ebd212b60101becefa96f97d17290fbe0a8d14153e96a80fc400c8
|
|
BLAKE2b-256 checksum How to use checksums |
87f115a39569687ebacab2c8fa01cc59daf100d07966a14e39f3b2885840c1f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / i3_focus_group-0.1.5-py3-none-any.whl
| Download URL | i3_focus_group-0.1.5-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
837edc63999b9c611b6c665920f9bbc2bc1d9cca055454afa3d533ba7865a653
|
|
BLAKE2b-256 checksum How to use checksums |
54fd30565264c357f661b629dde5a38ab1d4743100bf8955ace70401e7de5e81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Security for i3-focus-group 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.