Atom doesn't remember the window size


Every time I close and reopen Atom the window size is reset to default (fits the screen vertically).
Is it possible to save the last window size?

Request: Restore window positions on restart

Agree, it would be great to be able to modify/update the default window size.


This is pretty much the only thing that annoys me at the moment, but it is very annoying. Is there some hidden way to tweak this?


You could try setting the window size in your with the atom.setWindowDimensions() function perhaps.


Thank you. Where can I found the docs? This does not exist.

Ok, I figure it out

atom.setWindowDimensions({"width": 1180, "height": 900})

I could save the size in a file with getWindowDimensions and the load it.
How can I run code before a window closes?


That part I don’t know, sadly. I’ll poke around and see what I can find.


That can be easily be done in a package, I’m resisting the urge to create one.

You can save the window dimensions on deactivate and set the window dimensions on activate.

{x, y, width, height} = atom.getWindowDimensions()


I created a little package, feel free to fork, send a PR, or report an issue.


I’m glad you did it, because I was probably going to cave this weekend and do it if you didn’t :laughing:


Thank you. I will fork it.


Thanks for that it works really well. Is there any chance you could extend this to remember the sidebar width as well?



Now this function work in core? but with version 1.9.0 not work for me. =/