FollieHiyuki-dotfiles/home/.local/bin/X11/dwinswitch

8 lines
265 B
Plaintext
Raw Normal View History

2021-02-13 11:28:59 -05:00
#!/bin/sh
list=$(wmctrl -l)
num=$(echo "$list" | awk '{ $1=$2=$3=""; gsub(/^ */,""); printf "%3d - %s\n", NR, $0; }' | dmenu -l 20 -p "window" | cut -d '-' -f 1)
[ -z "$num" ] && exit
2021-03-22 16:13:53 -04:00
echo "$list" | awk -v N="$num" 'NR == N { print $1; }' | xargs -r wmctrl -i -a