Running commands with subprocess instead of os.system.
Added resume command to be called after sleep and hibernate.
Making GTK process the event queue before running commands so the window closes.