added basic window manager

for ensuring the same file isn't opened in different windows