Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #This script should minimize everything except conky and aterm
- #Add/remove entries according to example
- #I use this script as alternative to openbox's wincmd which minimizes conky and aterm
- #This script uses toggle by default, you could also use "add" to only minimize windows not show back
- #Do to do this just change "toggle" to "add"
- #Script addapted from http://crunchbang.org/forums/viewtopic.php?id=12917
- current="$(wmctrl -d | awk '/\*/ {print $1}')"
- currentopen="$(wmctrl -l | awk -v "curr=$current" 'curr==$2')"
- opennames="$(echo "$currentopen" | awk '{for (i=4; i <= NF; i++) printf("%s%c", $i, (i==NF)?ORS:OFS)}')"
- while read -r line; do
- case $line in
- "aterm")
- echo "Ignoring aterm"
- ;;
- "Conky")
- echo "Ignoring conky"
- ;;
- *)
- wmctrl -r "$line" -b toggle,hidden
- ;;
- esac
- done <<< "$opennames"
Advertisement
Add Comment
Please, Sign In to add comment