Skip to content

Instantly share code, notes, and snippets.

@lujanfernaud
Last active December 27, 2019 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lujanfernaud/3dea1c1e10676f265202dd022e55ec20 to your computer and use it in GitHub Desktop.
Save lujanfernaud/3dea1c1e10676f265202dd022e55ec20 to your computer and use it in GitHub Desktop.
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

davatorium/rofi#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment