Start nyxt always maximized

Is there an option to make nyxt start always maximized? Preferably set in config.I did not noticed that in either tutorial or manual.

I admit that I have only skimmed through source code of some classes, that is recommended as further reading in manual. I am Emacs beginner user, so I can kinda navigate through lisp language and reason about ti a little, but still a full configuration guide or well commented example would be in general very helpfull.

1 Like

Here is how I start Nyxt in full screen:

(defmethod nyxt::startup ((browser browser) urls)
  "Make a blank buffer."
  (window-make browser)
  (let ((window (current-window)))
    (window-set-buffer window (make-buffer :url (quri:uri "about:blank")))
    (toggle-fullscreen window)))

a much better way to do it would probably to use some sort of hook :slight_smile:


Thank you for sharing your config!
There one small issue – I want to always restore my previous session, not to start on blank page. With that, I am having trouble incorporating your function … Simply removing the window-set-buffer and its arguments doesnt work, also just setting (toggle-fullscreen window).
Last, this toggle-fullscreen does seem to respect any panels or window borders, etc… It just takes over the whole screen. That is a little too much for my taste.
Is there any alternative to this maximization that respects current desktop environment features? (Panels, window borders, etc …)

No problem!

I don’t know how to set it to the maximum. That is the responsibility of your WM. You can set specific rules to make it ‘maximize’ in the way that you are describing. You can usually set a rule for a specific window class or something.

Then you won’t need this function. Also, you’ll want to the :always-restore option in the browser slot for the session-restore-prompt history.

In other words

(define-configuration browser
  ((session-restore-prompt :always-restore)))

Oh, that did not occured to me.
It is strange, KWin on KDE with its rules actually maximizes the same way as your function. Interestingly, if I set “maximization” in other applications configs (namely emacs and alacritty (terminal emulator)), they work as I am used to …
I try to look for the solution, or just maximize the window manually.
About restoring sessions, yeah, I am using always-restore :slight_smile: Thank you for pointing that out.

No problem, best of luck with your search! I wish I knew more to help!