From c4bbb417c52149865b943690b275437f324c3b45 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Sat, 1 May 2021 15:37:29 +0200 Subject: [PATCH] nyxt: Set fallback-url in Emacs-imported engines. --- .config/nyxt/init.lisp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/nyxt/init.lisp b/.config/nyxt/init.lisp index 1e794512..1af696dd 100644 --- a/.config/nyxt/init.lisp +++ b/.config/nyxt/init.lisp @@ -106,7 +106,10 @@ Recognized formats: when (eq (car object) 'defengine) collect (make-instance 'search-engine :shortcut (getf (nthcdr 3 object) :keybinding) - :search-url (format-c->lisp (nth 2 object))))) + :search-url (format-c->lisp (nth 2 object)) + :fallback-url (let* ((url (nth 2 object)) + (pos (position #\/ url :from-end t))) + (str:substring 0 (1+ pos) url)) ))) (defun personal-file (path) (str:concat (uiop:getenv "PERSONAL") "/" path))