Basic questions & setup for complete beginner

As the title suggests, I’m a beginner not only to Nyxt, but to keyboard-driven browsers as a whole, and LISP. I’ve uninstalled Firefox so I can focus on learning Nyxt and I only have Epiphany as a backup browser. I am trying to get Nyxt setup as a daily-driver.

My questions are:

1.) What is the difference between auto-config, config, and init files?
2.) How do I override autofill.lisp default entries and add my own from within one of the aforementioned config files?
3.) Why does blocker-mode require an initial update-hostlists command before the hostlists file is created and, even then, seemingly block nothing even when enabled?
4.) How do I specify using GNOME text editor1 as my external-editor-program?
1 I use the Flatpak version so the path is: /var/lib/flatpak/app/org.gnome.TextEditor/x86_64/stable/58af5a9a6331e07de8e6c212147c351b3170c4bac28be0a86b61e474b1817044/files/bin/gnome-text-editor
5.) How do I setup KeePassXC?
6.) How do I edit basic theme components (e.g. accent color)?

I’m sorry for the barrage of questions, but having this knowledge will allow me to use Nyxt for everyday use and the documentation is a bit convoluted at the moment. I have ordered ‘Common LISP: A Gentle Introduction to Symbolic Computation’ so I do hope to get a grasp on hacking Nyxt in the future.

  1. Config and init files are synonyms. A config file is a file written by the user and it is evaluated the last when Nyxt starts. Since it is evaluated last, it is an entry point for user configuration. In Nyxt, users can also configure it using the UI (see command common-settings). Those settings are saved to the auto config file, since Nyxt is doing the configuration for the user.
  2. This is rather advanced for now. I’d suggest getting familiar with Nyxt’s help system (open URL nyxt:manual#the-nyxt-help-system in Nyxt) and the Common Lisp language. Looking at the configs of other users might also be useful, e.g.
  3. That is a topic that deserves opening an issue on GitHub with clear instructions on how to reproduce it.
  4. Copy to your config file:
(define-configuration browser
  ((external-editor-program (list "flatpak" "run" "org.gnome.TextEditor"))))
  1. This is detailed in the manual.
  2. Probably as follows
(define-configuration browser
  ((theme (make-instance 'theme:theme :action-color "hex-code"))))

Let’s improve the documentation together. Open a PR when you find something lacking.

You have chosen a good book. Good luck!

I have done so, but C-u, the supposed key binding for edit-with-external-editor, only states:

Pressed keys: C-u

and using the command prompt buffer gives the warning:

Please set external-editor-program browser slot.

Here is the entirety of my config.lisp file (with no other files in ~/.config/nyxt/ being used at startup):

(defmethod customize-instance ((browser browser) &key)
  (setf (slot-value browser 'restore-session-on-startup-p) t))
(defmethod customize-instance ((buffer buffer) &key)
  (setf (slot-value buffer 'default-modes)
            nyxt/mode/annotate:annotate-mode nyxt/mode/bookmark:bookmark-mode
            nyxt/mode/history:history-mode nyxt/mode/password:password-mode
            nyxt/mode/hint:hint-mode nyxt/mode/document:document-mode
            nyxt/mode/spell-check:spell-check-mode base-mode)))
(define-configuration browser
  ((external-editor-program (list "flatpak" "run" "org.gnome.TextEditor"))))

Also, I followed the details in the manual and set my config file up like this:

(defmethod initialize-instance :after
           ((interface password:keepassxc-interface)
            &key &allow-other-keys)
  "It's obviously not recommended to set master password here,
as your config is likely unencrypted and can reveal your password to someone
peeking at the screen."
  (setf (password:password-file interface)

(define-configuration nyxt/mode/password:password-mode
    (make-instance 'password:keepassxc-interface))))

(define-configuration buffer
    (append (list 'nyxt/mode/password:password-mode) %slot-value%))))

But using copy-password outputs:

Error on separate thread: Couldn't execute "clip": No such file or directory

Note: I removed the key-file and Yubi key lines since they don't apply here.

The keybinding that invokes the command is C-u C-o, not C-u.

Try to delete the following from your config.

(defmethod customize-instance ((browser browser) &key)
  (setf (slot-value browser 'restore-session-on-startup-p) t))

Also, are you sure that the config file is being read? If you start Nyxt from the command line you should be able to read its log.

This is a bug. clip should be an argument appended to command keepassxc-cli as far as I understand. Please report it on GitHub. It may be related to commit 1871bd051b0fc570f9f60806ce8e6d296fa34dde.

Yes. The output of console reads:
<INFO> [02:27:07] Loading Lisp file #P"/home/absinthium/.config/nyxt/config.lisp".

Also, it's recognizing some of the code that you wrote because it's mentioning flatpak in the error message:
WARN - Warning: Failed editing: Couldn't execute &quot;flatpak&quot;: No such file or directory

Will do!

I think that this is due to the nature of Flatpaks, which are sandboxed environments. If the binary can't be found in your home directory, then it won't be able to look for it. What's the output of which flatpak and nyxt --eval "(serapeum:resolve-executable \"flatpak\")" --quit?


<WARN> [03:09:07] Warning: Error in s-exp evaluation: The variable KEEPASSXC-CLI is unbound. NIL

Shall we continue on here or on the bug report thread?

Let’s continue on GitHub.

@absinthium about the external editor issue. Which desktop manager are you using? Can you install xdg-desktop-portal-gtk and xdg-desktop-portal?

Then set external-editor-program to (list "gio" "open") and invoke a command that uses the external editor. What happens?

I use GNOME 44.5.

xdg-desktop-portal-gtk is already the newest version (1.14.1-1). xdg-desktop-portal is already the newest version (1.18.0-1).

The open dialog is successfully invoked and I choose 'Text Editor'. When I open it and insert text and save it, the text is not applied to the input field that I selected to edit. At least we're making some progress though!

Could you explain in detail all of the steps that you have taken? The external editor can be used to edit files, not to edit input fields as far as I know.

I have taken all of the steps that you suggested which were setting external-editor-program to (list "flatpak" "run" "org.gnome.TextEditor") & (list "gio" "open").

The official documentation states that edit-with-external-editor can:

Edit the current input field using external-editor-program.

Sorry, now my memory is refreshed. It was even me that worked on that feature at some point in the past. There is a bug here. Could you please report it on GitHub?