akiyosi / goneovim

A GUI frontend for neovim.
MIT License
2.35k stars 60 forks source link

How to maximize window on startup (Windows)? #509

Closed ashrasmun closed 7 months ago

ashrasmun commented 7 months ago

Hello,

I've checked https://github.com/akiyosi/goneovim/issues/76 and I wonder - if there's an analogous functionality available for Windows? I've tried invoking goneovim.exe --maximized and the option felt like it's ignored, or I misunderstand it. It should display the goneovim window like a browser after pressing F11, right?

Kind Regards :)

akiyosi commented 7 months ago

@ashrasmun Hi :) Your approach is correct. If this does not maximize, there are the following possibilities.

Try the following command. This command launches plain Neovim at the maximum screen size.

goneovim.exe --maximized -u NONE
ashrasmun commented 7 months ago

I've tried the command you've mentioned, but to no avail :( It's maximized, but I can still see the Windows bar on the bottom and the title bar.

image

I guess I'll just force it externally by changing window's settings via winapi.

akiyosi commented 7 months ago

@ashrasmun Oh, is the behavior you are expecting full-screening? If so, the following command can do it.

goneovim.exe --fullscreen
ashrasmun commented 7 months ago

Works like a charm, thank you! I guess that white flashback is a bit of a nuissance, but it happens only once per invocation, so whatever. Is there an option to switch in and out of this mode when I'm in Nvim already?

gerroon commented 7 months ago

Is there a way to make it remember the last window size at all?

akiyosi commented 7 months ago

@ashrasmun Use GonvimFullscreen command.

The window can be made full screen by executing :GonvimFullscreen or :GonvimFullscreen 1 . Also, by executing :GonvimFullscreen 0, the full screen can be exited.

@gerroon Add the following in your settings.toml. About settings.toml, See https://github.com/akiyosi/goneovim/wiki/Usage#configuration

[Editor]
# ...
RestoreWindowGeometry = true
ashrasmun commented 7 months ago

Damn, there are so many great options there. I don't know how have I missed them. Thanks a lot again! Goneovim is the best! :)

gerroon commented 7 months ago

@akiyosi thanks for the reply.

As far as I can tell the .toml setting you provided does not work on windows 11. It still starts small after a restarting of the app. Is there anything special that needs to be done? Or maybe the location of the setting is wrong.

Also I am using it with vanilla LazyVim, not sure if that might be doing anything else.

C:\Users\USER\.config\goneovim

EDIT:

It actually works, epic. There was another line with the same setting that was setting back to the default I think. No more struggling it with scaling it.