How to create a similar shortcut in Nyxt?

Hello fellow Nyxt hackers,

I have the following shortcut written in Elisp that I use in my Emacs config file:

(defun nyxt-quickload-gi-gtk ()
  "Insert snippet to load Nyxt."
  (interactive)
  (insert "(ql:quickload :nyxt/gi-gtk)")
  (backward-word 2))
(global-set-key (kbd "C-x C-M-n") 'nyxt-quickload-gi-gtk) 

I would like to create something similar in Nyxt. Especially to insert strings on the prompt-buffer. Instead of repetitively typing them, I would use this shortcut.

Apparently, it is possible to do so in Nyxt with headless task (in addition to a tweak in the config file). This was recently merged to master. However, I do not know how to do it yet.

I thought about writing a private email to someone on the team about this but since this could be of interest to other people, Discourse seemed to be more appropriate :slight_smile:

Thanks!

Hi Pedro! One reference you can use is the set-url test that waits on the prompt-buffer to be available and inserts text inside it.

1 Like