When reopen atom, can I make window not be fullscreen(last time it is fullscreen)


#1

can i write code in init.coffee to make window not be fullscreen?


#2

Yes, that’s possible, add this line to your init.coffee:

atom.getCurrentWindow().unmaximize()

#3

but ,, in OSX 10.10.5, is uesless.

it first become small, and then still become fullscreen


#4

Does it work if add a process.nextTick?

process.nextTick -> atom.getCurrentWindow().unmaximize()

#5

still can’t…


#6

Does atom.getCurrentWindow().unmaximize() work at all? You can test it by opening the dev tools console with ctrl-shift-i (maybe cmd-shift-i on Mac, I don’t know…), then run the command. If it doesn’t work, you should probably file an issue on the Atom or the Electron repo (and please post a link to the issue here). If it is working, try the following:

  1. Close every instance of Atom
  2. rm -r ~/.atom/storage (or mv ~/.atom/storage ~/.atom/storage.bak if you want a backup)
  3. (Make sure the atom.getCurrentWindow().unmaximize() line is still in your init.coffee)
  4. Start Atom again

#7

Wait, I see now that you said “full screen” which I interpreted as “maximized”… If it’s actually full screen you’re talking about, try atom.setFullScreen(false).


#8

my setting

still can’t


#9

Nope, doesn’t work here (OSX). I would love for something to make Atom forget its fullscreenness, for some reason it’s annoying.