A fast alt-tab window switcher for Wayland compositors (targeting Sway). Behaves like Windows/macOS alt-tab: a small overlay lists open windows sorted by most-recently-used order, hold Alt and press Tab to cycle, release Alt to switch.
Single Rust binary, ~2.8MB stripped. Zero runtime dependencies beyond Wayland.
Disclaimer: This application was fully generated by AI (Claude). The entire codebase — architecture, implementation, and documentation — was produced through AI-assisted development.
- MRU window switching — Windows sorted by most-recently-used order, not workspace order
- Daemon architecture — Long-lived process tracks focus changes over time for accurate MRU history
- Multi-monitor aware — Overlay appears on the same monitor as the focused window
- Window icons — Loads PNG icons from desktop files and icon themes (hicolor)
- Configurable — Colors and layout customizable via TOML config file
- Proper font rendering — Embedded DroidSans TTF font rendered with fontdue (supports full Unicode)
- Fast — Software rendering with tiny-skia, no heavy GUI toolkit dependencies
- Lightweight — ~2.8MB stripped, single binary with embedded font
- Sway (or any wlroots-based Wayland compositor with
wlr-foreign-toplevel-managementandwlr-layer-shellsupport) libxkbcommonandwaylandclient libraries (runtime)
Building from source (including cargo install) requires development headers for libxkbcommon and wayland:
Fedora:
sudo dnf install libxkbcommon-devel wayland-develDebian/Ubuntu:
sudo apt install libxkbcommon-dev libwayland-devArch Linux:
sudo pacman -S libxkbcommon waylandcargo install alttabgit clone https://github.com/e-gautier/alttab.git
cd alttab
cargo build --release
# Binary is at target/release/alttabalttab &This starts a background daemon that connects to Wayland and continuously tracks window focus changes to build MRU history.
Add to ~/.config/sway/config:
bindsym Alt+Tab exec /path/to/alttab --show
Now press Alt+Tab to bring up the switcher. Keep holding Alt and press Tab to cycle through windows. Release Alt to switch to the selected window.
| Key | Action |
|---|---|
| Tab / Down / Right | Select next window |
| Shift+Tab / Up / Left | Select previous window |
| Enter | Confirm and switch |
| Escape | Cancel |
| Release Alt | Confirm and switch |
Config file: ~/.config/alttab/config.toml
All fields are optional — missing fields use sensible defaults.
[colors]
background = "#1E1E1EE6"
item = "#323232FF"
selected = "#3C78D8FF"
title = "#FFFFFFFF"
app_id = "#AAAAAAFF"
[layout]
width = 500
max_height = 600
item_height = 48
item_spacing = 8
padding = 16
corner_radius = 12.0
item_corner_radius = 8.0Hex format: #RRGGBB (opaque) or #RRGGBBAA (with alpha).
| Field | Description | Default |
|---|---|---|
background |
Overlay background | #1E1E1EE6 (dark, semi-transparent) |
item |
Unselected item background | #323232FF |
selected |
Selected item highlight | #3C78D8FF (blue) |
title |
Window title text | #FFFFFFFF (white) |
app_id |
App ID text below title | #AAAAAAFF (gray) |
| Field | Description | Default |
|---|---|---|
width |
Overlay width in pixels | 500 |
max_height |
Maximum overlay height | 600 |
item_height |
Height of each window entry | 48 |
item_spacing |
Space between entries | 8 |
padding |
Inner padding | 16 |
corner_radius |
Overlay corner radius | 12.0 |
item_corner_radius |
Item corner radius | 8.0 |
Copy any of these [colors] sections into your ~/.config/alttab/config.toml.
The built-in theme. Dark background with a blue selection highlight.
[colors]
background = "#1E1E1EE6"
item = "#323232FF"
selected = "#3C78D8FF"
title = "#FFFFFFFF"
app_id = "#AAAAAAFF"Inspired by the Nord color palette. Cool, arctic tones.
[colors]
background = "#2E3440E6"
item = "#3B4252FF"
selected = "#5E81ACFF"
title = "#ECEFF4FF"
app_id = "#D8DEE9AA"Inspired by Catppuccin Mocha. Warm pastel tones on a dark base.
[colors]
background = "#1E1E2EE6"
item = "#313244FF"
selected = "#89B4FAFF"
title = "#CDD6F4FF"
app_id = "#A6ADC8AA"Inspired by Gruvbox. Retro, warm, earthy tones.
[colors]
background = "#282828E6"
item = "#3C3836FF"
selected = "#D65D0EFF"
title = "#EBDBB2FF"
app_id = "#A89984AA"Inspired by Dracula. Purple-accented dark theme.
[colors]
background = "#282A36E6"
item = "#44475AFF"
selected = "#BD93F9FF"
title = "#F8F8F2FF"
app_id = "#6272A4FF"Inspired by Solarized. Precision-engineered color scheme.
[colors]
background = "#002B36E6"
item = "#073642FF"
selected = "#268BD2FF"
title = "#FDF6E3FF"
app_id = "#839496AA"Inspired by Tokyo Night. Muted blues and purples.
[colors]
background = "#1A1B26E6"
item = "#24283BFF"
selected = "#7AA2F7FF"
title = "#C0CAF5FF"
app_id = "#565F89FF"Inspired by Rosé Pine. Muted, elegant tones.
[colors]
background = "#191724E6"
item = "#1F1D2EFF"
selected = "#C4A7E7FF"
title = "#E0DEF4FF"
app_id = "#908CAAAA"Inspired by Kanagawa. Japanese ink painting aesthetic.
[colors]
background = "#1F1F28E6"
item = "#2A2A37FF"
selected = "#7E9CD8FF"
title = "#DCD7BAFF"
app_id = "#727169AA"Minimal grayscale. No color distractions.
[colors]
background = "#181818E6"
item = "#282828FF"
selected = "#585858FF"
title = "#E8E8E8FF"
app_id = "#888888AA"The wlr-foreign-toplevel-management Wayland protocol only reports current window state at connection time — it has no historical activation order. A fresh process on each Alt+Tab would see all windows but wouldn't know which was used most recently.
To solve this, alttab runs as a daemon that stays alive and watches activation state transitions over time, building real MRU history. When triggered via alttab --show, the daemon creates a layer-shell overlay with exclusive keyboard grab and renders the window list using software rendering into shared memory buffers.
- PNG icons only — SVG/scalable icons are not supported
- Nearest-neighbor icon scaling — Fast but not the highest quality
- Sway/wlroots only — Requires
wlr-foreign-toplevel-managementandwlr-layer-shellprotocols (not available on GNOME/KDE Wayland)
MIT — see LICENSE.
The embedded DroidSans font is licensed under the Apache License 2.0 (Copyright 2008 The Android Open Source Project) — see fonts/LICENSE-DroidSans.
