Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rofi: Alt+Tab Window Switching

Rofi: Alt+Tab (Super+Tab) Window Switching

This is using “Super” instead of “Alt”. If you want to use the latter you only need to replace all “Super” instances with “Tab”.

Bash Script

#!/bin/bash

# Related discussion:
# https://github.com/davatorium/rofi/issues/38

xdotool search --sync --syncsleep 50 --limit 1 --class Rofi keyup --delay 0 Tab key --delay 0 Tab keyup --delay 0 Super_L keydown --delay 0 Super_L&
rofi \
    -show windowcd -modi windowcd -window-format " {t}" -show-icons \
    -kb-cancel "Super+Escape,Escape" \
    -kb-accept-entry "!Super-Tab,!Super_L,!Super+Super_L,Return"\
    -kb-row-down "Super+Tab,Super+Down,Down" \
    -kb-row-up "Super+Shift+Tab,Super+Up,Up"&
sleep 0.1 &&
xdotool key Tab

Related Discussion

https://github.com/davatorium/rofi/issues/38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.