bunch of stuff
This commit is contained in:
33
Nyxt.org
33
Nyxt.org
@@ -4,18 +4,15 @@
|
||||
Nyxt is a browser written in Common Lisp that follows the same philosophy of extensibility as Emacs. This makes it a perfect companion to an Emacs centered eco-system when you need a browser with more features than Eww or w3m.
|
||||
|
||||
* Load Quicklisp
|
||||
#+begin_src emacs-lisp
|
||||
#+begin_src lisp
|
||||
(in-package :nyxt)
|
||||
(load "~/quicklisp/setup.lisp")
|
||||
(ql:quickload 'slynk)
|
||||
;; #-quicklisp
|
||||
;; (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
|
||||
;; (user-homedir-pathname))))
|
||||
;; (when (probe-file quicklisp-init)
|
||||
;; (load quicklisp-init)))
|
||||
#+end_src
|
||||
* Start Slynk server
|
||||
* Import Functions
|
||||
#+begin_src lisp
|
||||
(load-after-system :slynk "~/.config/nyxt/my-slynk.lisp")
|
||||
(load-after-system :slynk (nyxt-init-file "my-slink.lisp"))
|
||||
;; (load-after-system :slynk "~/.config/nyxt/my-slynk.lisp")
|
||||
#+end_src
|
||||
|
||||
* Keybindings
|
||||
@@ -153,8 +150,9 @@ Password managers are an essential feature and thankfully Nyxt allows me to inte
|
||||
((password-interface (make-instance 'password:user-keepassxc-interface))))
|
||||
#+end_src
|
||||
* Functions
|
||||
#+begin_src emacs-lisp
|
||||
(in-package :nyxt)
|
||||
** Show bookmarks first
|
||||
I've ripped these functions out of the source code and swapped the sources in order to have bookmarks show up first upon executing set-url or set-url-new-buffer.
|
||||
#+begin_src lisp
|
||||
(define-command set-url (&key (prefill-current-url-p t))
|
||||
"Set the URL for the current buffer, completing with history."
|
||||
(let ((history (set-url-history *browser*))
|
||||
@@ -220,3 +218,18 @@ I would like to keep expanding on these redirection functions so I can have nati
|
||||
;; (hooks:add-hook %slot-default% (make-handler-resource #'old-reddit-handler)))))
|
||||
;; (See url-dispatching-handler for a simpler way to achieve the same result.)
|
||||
#+end_src
|
||||
* Testing
|
||||
#+begin_src lisp
|
||||
(defun nyxt-init-file (&optional subpath)
|
||||
"Return SUBPATH relative to `*init-file-path*'.
|
||||
Return nil if `*init-file-path*' is nil.
|
||||
|
||||
Example:
|
||||
If we want to load a define-command procedure that lives in ~/path/to/nyxt/config/dir/my-slink.lisp
|
||||
(load-after-system :slynk (nyxt-init-file \"my-slink.lisp\"))"
|
||||
(if subpath
|
||||
(uiop:subpathname* (uiop:pathname-directory-pathname
|
||||
(expand-path *init-file-path*))
|
||||
subpath)
|
||||
(expand-path *init-file-path*)))
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user