20 lines
264 B
Bash
Executable File
20 lines
264 B
Bash
Executable File
#!/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
|