def focus_window(winhandle, path=None, name=None, sleeptime=.01):
        """
        sudo apt-get install xautomation
        apt-get install autokey-gtk

        wmctrl -xa gnome-terminal.Gnome-terminal
        wmctrl -xl
        """
        import utool as ut
        import time
        print('focus: ' + winhandle)
        args = ['wmctrl', '-xa', winhandle]
        ut.cmd(*args, verbose=False, quiet=True)
        time.sleep(sleeptime)
sudo apt-get install xautomation
        apt-get install autokey-gtk

        wmctrl -xa gnome-terminal.Gnome-terminal
        wmctrl -xl