#!/bin/sh while [ -n "$(wmctrl -l | grep "Firefox")" ]; do wmctrl -c "Firefox" done