Some improvements to tmux switching

Thanks @tarruda