rewriting topbar script to act on window resize.