Here's a small bash script which brings all the windows whose title matches ARG to the front:
bring-all-windows.bash ARG
The script:
#!/bin/bash
Program=$@
wmctrl -l | while read Window; do
if [[ "$Window" == *"$Program"* ]]; then
echo "DEBUG: I bring $Window"
code=`echo "$Window" | cut -f 1 -d " "`
wmctrl -i -a $code
fi
done
You can bind
bring-all-windows.bash Terminal
to a hotkey (don't forget to put the script in a login shell PATH, or write a full path to it).
The script requires wmctrl
to be installed.
Edit:
To run something from the terminal, navigate to the dir where you put the script, then
chmod +x bring-all-windows.bash
./bring-all-windows.bash Terminal
When you're sure it works from the terminal, try to bind it to a hotkey, giving the full path. When you're sure it works with a hotkey and the full path to the script, then try adding it's dir to the login shell PATH, and see if it works that way.