[rc.lua] Handle more dialog boxes
[rc.lua] Refactor some window rules