Skip to content

Instantly share code, notes, and snippets.

@amiryal
Created December 31, 2011 12:29
Show Gist options
  • Save amiryal/1543873 to your computer and use it in GitHub Desktop.
Save amiryal/1543873 to your computer and use it in GitHub Desktop.
Xubuntu (Xfce) fuzzy autocomplete menu window switcher keyboard shortcuts

To have the executables available in Ubuntu or Debian:

apt-get install suckless-tools

Keyboard shortcut command to choose from all windows:

/bin/sh -c 'wmctrl -l | while read i j k l; do echo $i $l; done | dmenu -i -l 16 | awk "{print \$1}" | while read i; do wmctrl -iR $i; done'

Keyboard shortcut command to choose from windows of the same process as currently active window:

/bin/sh -c 'wmctrl -lp | awk "(\$3 == "$(xprop -id $(xprop -root -f _NET_ACTIVE_WINDOW 0x " \$0\\n" _NET_ACTIVE_WINDOW | awk "{print \$2}") -f _NET_WM_PID 0c " \$0\\n" _NET_WM_PID | awk "{print \$2}")" && \$4 == \""$(hostname)"\") {print}" | while read i j k l m; do echo $i $m; done | dmenu -i -l 16 | awk "{print \$1}" | while read i; do wmctrl -iR $i; done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment