summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lisp31
-rw-r--r--theme.lisp4
2 files changed, 21 insertions, 14 deletions
diff --git a/init.lisp b/init.lisp
index d992dbc..2f0a806 100644
--- a/init.lisp
+++ b/init.lisp
@@ -19,7 +19,7 @@
(define-command-global start-slynk (&optional (slynk-port *swank-port*))
"Start a Slynk server that can be connected to, for instance, in
Emacs via SLY.
-pWarning: This allows Next to be controlled remotely, that is, to
+Warning: This allows Next to be controlled remotely, that is, to
execute arbitrary code with the privileges of the user running Next.
Make sure you understand the security risks associated with this
before running this command."
@@ -43,33 +43,40 @@ before running this command."
(defmacro with-hints (hint-var &optional prompt &body body)
`(nyxt/web-mode:query-hints ,prompt
- (lambda (nyxt/web-mode::result)
+ (lambda (result)
(let* ((,hint-var (format nil "~a"
- (url (first nyxt/web-mode::result)))))
+ (url (first result)))))
(bt:make-thread (lambda ()
,@body)
- :name ,(symbol-name hint-var))
- :annotate-visible-only-p
- nyxt/web-mode::annotate-visible-only-p))))
+ :name ,(symbol-name hint-var))))))
-(define-command-global mpv-hints (&key nyxt/web-mode::annotate-visible-only-p)
+(define-command-global mpv-hints ()
"Display hints and open them in mpv"
(with-hints mpv-hint "Open with mpv:"
(mpv mpv-hint)))
-(define-command-global ytdl-hints (&key nyxt/web-mode::annotate-visible-only-p)
+(define-command-global ytdl-hints ()
"Display hints and download them with youtube-dl"
(with-hints hint "Download with youtube-dl:"
(youtube-dl hint)))
-
(define-key *mf-keymap*
"C-x C-v" 'mpv-hints
"C-x C-y" 'ytdl-hints)
(define-mode mf-mode ()
"Apply the custom keybindings in `*mf-keymap*'"
- ((keymap-scheme (keymap:make-scheme
- scheme:emacs *mf-keymap*))))
+ ((keyscheme-map (keymap:make-scheme
+ scheme:cua *mf-keymap*
+ scheme:emacs *mf-keymap*
+ scheme:vi-normal *mf-keymap*))))
(define-configuration buffer
- ((default-modes (append '(nyxt::emacs-mode nyxt::blocker-mode nyxt::dark-mode mf-mode) %slot-default%))))
+ ((default-modes (append '(emacs-mode blocker-mode dark-mode mf-mode) %slot-default%))))
+
+;; run (set-url) automatically when spawning a new buffer
+;; (hooks:add-hook 'make-buffer-after-hook
+;; (lambda ()
+;; (unless (string=
+;; (quri:uri-path (url (current-buffer)))
+;; "nyxt.atlas.engineer") ; Default start page
+;; (set-url))))
diff --git a/theme.lisp b/theme.lisp
index 83617d7..951d309 100644
--- a/theme.lisp
+++ b/theme.lisp
@@ -95,8 +95,8 @@
(define-configuration nyxt/web-mode:web-mode
((nyxt/web-mode:highlighted-box-style
(cl-css:css
- '((".nyxt-hint.nyxt-highlight-hint"
- :background "#00bcff")))
+ '((".nyxt-hint"
+ :background "#9f80ff")))
:documentation "The style of highlighted boxes, e.g. link hints.")))
;;;; Configure StatusLines Styles