dotfiles/.bin/OLD/dswitcher
2024-02-14 07:55:58 +01:00

7 lines
263 B
Bash
Executable File

#!/bin/sh
date=$(date +"%a %d. %b %R")
num=$(wmctrl -l | awk '{$1="";$2="";$3="";gsub(/ /,"", $0);printf("%d - %s\n",NR,$0)}' | dmenu -b -i -p "$date" -l 30 | cut -d"-" -f1)
[ -z "$num" ] || wmctrl -l | awk -v n="$num" 'NR==n { print $1 }' | xargs wmctrl -i -a