mabox-tools/bin/killwindows

20 lines
264 B
Plaintext
Raw Permalink Normal View History

2021-05-18 16:49:07 +02:00
#!/bin/bash
desktop() {
for n in $(wmctrl -l | awk -v d="$1" '$2 == d {print $1}')
do
wmctrl -i -c $n;
done
}
all() {
for n in $(wmctrl -l | awk $2 '!/-1/ {print $1}')
do
wmctrl -i -c $n;
done
}
case "$1" in
all) all;;
*) desktop "$1";;
esac