I am trying to use a script suggested for an answer I asked earlier, however I am having trouble getting it to work.
The script should bring all instances of a program (whose name is passed as an argument) forward.
Here is a copy of 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
I have added a keyboard shortcut in preferences whose command is:
bash /home/michael/Scripts/bring-all-windows.bash terminal
It works fine for other applications like gedit but I get no response when I try it with terminal, Terminal or gnome-terminal.
Does anybody know why this might happen?