Alt+Tab window switcher for Wayland with a daemon and compositor keybinds.
Build
cargo build --release
Binary: /target/release/witcher
Installing
cargo install --path .Run
Start the daemon (required):
~/.cargo/bin/witcher --daemon --backend niriSupported backends: niri, hyprland
Trigger the switcher from your compositor keybinding:
~/.cargo/bin/witcher --cycle-nextReverse cycle:
~/.cargo/bin/witcher --cycle-prevExample keybinds:
Niri (~/.config/niri/config.kdl):
binds {
Alt+Tab { spawn "~/.cargo/bin/witcher" "--cycle-next" }
Alt+Shift+Tab { spawn "~/.cargo/bin/witcher" "--cycle-prev" }
}
Hyprland (~/.config/hypr/hyprland.conf):
bind = ALT, Tab, exec, ~/.cargo/bin/witcher --cycle-next
bind = ALT SHIFT, Tab, exec, ~/.cargo/bin/witcher --cycle-prev
Config
In ~/.config/witcher/config.json
{
"icon_size": 77,
"icon_spacing": 22,
"panel_padding": 14,
"highlight_padding": 24,
"corner_radius": 19.2,
"border_width": 2.0,
"indicator_border_width": 2.0,
"panel_opacity": 0.55,
"selected_indicator_opacity": 0.45,
"panel_border_opacity": 0.65,
"selected_indicator_border_opacity": 0.65
}Notes
- Ensure Alt+Tab binds run
~/.cargo/bin/witcher --cycle-nextso the compositor consumes the key. - The daemon must be running before Alt+Tab will work.
Niri autostart example
In ~/.config/niri/config.kdl:
spawn-at-startup "~/.cargo/bin/witcher" "--daemon" "--backend" "niri"























