Global History Tree: Your Map of the Internet

A article about our new global history tree:
it talks mostly about the benefits for an end-user. If you have any questions (technical or otherwise), please post them here!

So I know this feature is awesome and obviously my question is counterintuitive to it in some ways but how would I go about making Nyxt wipe both the global and standard history trees (so no history saved) on closure? I like the idea of it when browsing but don’t want any history saved anywhere after I close Nyxt. This is less for privacy reasons and more for keeping everything as a clean slate at all times.

You could always start with nosave buffers, OR you could simply wipe the history file every time. You can delete ~/.local/share/nyxt/history. You could add this as a function in your init file (that the history is deleted).

If you simply don’t want it to restore any buffers/state from the previous session, you can have a configuration like mine:

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

@jmercouris Thank you for the advice. Just for points of clarity on this. If I have it running in nosave from the beginning that won’t mess with the current history at all? So while it won’t persist anything would it still allow me history until I close Nyxt? I will attempt to test this but wanted to put the question out there in case I struggle with making it work haha

Also I do already use the restore piece but the correct way to do that and not restore would be the below instead yeah? Or am I doing it wrong haha

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

And now that I’ve done some playing with it I like your deleting of that history file being deleted via a function. How would I go about doing that on browser close. Obviously I could make a script in bash do something similar since it is just a file but I don’t think I can get it to do that on browser close. So if my init file could do that that would be great.

You could do something like

(define-command-global my-quit-function ()
  (uiop:delete-file-if-exists (expand-data-path (data-profile (current-buffer))
                                          (history-path (current-buffer))))

then you would just call your delete function. You could also call it in your startup, or on some hook on some event. I hope that helps :slight_smile:

Sorry, I meant to say you would call your ‘quit’ function in place of the default quit.

Awesome that works. I just overrode the keybinding for closing it out with that command instead. Might end up trying the startup piece sometime. But all good for now.