| Crates.io | i3-back |
| lib.rs | i3-back |
| version | 0.3.2 |
| created_at | 2023-02-25 23:16:20.570088+00 |
| updated_at | 2023-02-26 22:00:06.11657+00 |
| description | An i3/Sway utility to switch focus to your last focused window. Allows for behavior similar to Alt+Tab on other desktop environments. |
| homepage | https://github.com/Cretezy/i3-back |
| repository | https://github.com/Cretezy/i3-back |
| max_upload_size | |
| id | 794702 |
| size | 24,914 |
An i3/Sway utility to switch focus to your last focused window. Allows for behavior similar to Alt+Tab on other desktop environments.
Features:
bindsymhttps://user-images.githubusercontent.com/2672503/221384419-3d62413d-8987-4147-82bc-5e87cea8bb90.mp4
i3-back requires i3/Sway. It is written in Rust. It can be installed through many method:
Cargo (Rust's package manager) package:
cargo install i3-back
Arch Linux from the AUR (i3-back-bin):
yay -S i3-back-bin # Or with paru or other AUR wrappers
# Or manually: https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages
Debian/Ubuntu as a deb from GitHub releases
Binary from GitHub releases
In your i3/Sway configuration (~/.config/i3/config/~/.config/sway/config):
# Start the daemon which listens to focus changes and sets _back mark
exec --no-startup-id ~/.cargo/bin/i3-back
# Bind a switch key, which focuses the previously focused window
bindsym $mod+Tab [con_mark=_back] focus
Replace ~/.cargo/bin with wherever the i3-back binary is placed if not installed through Cargo.
Options are passed to i3-back as flags. Use --help/-h to see all options.
Example exec with options:
exec --no-startup-id ~/.cargo/bin/i3-back --debug --mark _last
Available options:
--help/-h: See help text. Also see --version--mark <MARK>/-m <MARK>: Change the default _back mark name. Make sure to update your switcher bind's con_mark to match--debug/-d: Print extra debugging informationExample i3-back --help:
An i3/Sway utility to switch focus to your last focused window. Allows for behavior similar to Alt+Tab on other desktop environments.
Usage: i3-back [OPTIONS]
Options:
-m, --mark <MARK> Change the name of the mark to set [default: _back]
-d, --debug Print extra debugging information
-h, --help Print help
-V, --version Print version
The daemon (i3-back) listen for i3 window events (through i3's socket, from the I3SOCK environment variable).
When a window event is received, i3-back records the previously focused window ID.
When the previous focus has changed, it sets the _back mark (or whichever is configured through the --mark flag) to the last focused window.
When the switch bind is called (through i3's bindsym), it focuses the mark set by the daemon.