You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to use the part in your config to define certain modes to be enabled by default like blocker and reduce tracking.
Is there a way to disable certain modes globally? There's alot I don't need like annotate, hint, bookmarks, password. But they are always enabled. I was hoping setting the default-modes would only have the ones specified enabled.
Thanks :)
The text was updated successfully, but these errors were encountered:
You can try to redefine the default-modes :around method to remove the modes added on top of the pre-defined ones by some Nyxt modes. The definition of the default-modes :around is (as part of defgeneric default-modes):
(:method:around ((buffer buffer))
"Remove the duplicates from the `default-modes' and bring them all to a proper form.This allows setting modes as :DARK-MODE or 'EMACS-MODE in whatever package, andNsymbols will find the proper symbol, unless duplicate."
(mapcar (alex:rcurry #'resolve-user-symbol :mode (list-all-packages))
(remove-duplicates (call-next-method)
;; Modes at the beginning of the list have higher priority.:from-endt)))
We can preserve most of it and remove the unneeded modes from the result:
(defmethodnyxt:default-modes:around ((buffer buffer))
(remove-if#'(lambda (mode)
;; Adjust the list of modes here:
(member mode '(nyxt/annotate-mode:annotate-mode
nyxt/bookmark-mode:bookmark-mode
nyxt/password-mode:password-mode)))
(mapcar (alex:rcurry #'resolve-user-symbol :mode (list-all-packages))
(remove-duplicates (call-next-method)
;; Modes at the beginning of the list have higher priority.:from-endt))))
Alternatively, you can use buffer-after-make-hook to remove the modes after they were enabled.
I believe you can go from there on your own, but feel free to ask if something's unclear :)
Hi @aartaka !
Thanks for posting your config.
I was able to use the part in your config to define certain modes to be enabled by default like blocker and reduce tracking.
Is there a way to disable certain modes globally? There's alot I don't need like annotate, hint, bookmarks, password. But they are always enabled. I was hoping setting the default-modes would only have the ones specified enabled.
Thanks :)
The text was updated successfully, but these errors were encountered: