aboutsummaryrefslogtreecommitdiffstats
path: root/.config/herbstluftwm/switcher.sh
blob: 9bf344c1394cc8e14271ef984b1598452a1c2595 (plain)
1
2
3
4
5
6
7
#!/bin/bash

IFS=$'\r\n'  clients=($(wmctrl -l | cut -c -10))
number=$(wmctrl -l | cut -c 20- | nl -w 2 -s ") " | dmenu -i -h 16 -nb $1 -nf $2 -sb $3 -sf $4 -p "Select:" -l 40 | grep -oE '[0-9]' | head -1)
if [ $number ]; then
	herbstclient jumpto ${clients[$(expr $number - 1)]}
fi