dotfiles/nixos/hm-modules/emacs/.emacs.d/org/emacs-webkit.org
2021-01-18 20:24:07 +01:00

1.4 KiB

EmacsWebkit

  (straight-use-package
   '(webkit :type git :host github :repo "akirakyle/emacs-webkit" :branch "main"
     :files (:defaults "*.js" "*.css" "*.h" "*.c" "Makefile")
     :build (("nix-shell" "-p" "gtk3" "gcc" "glib" "pkg-config" "webkit" "--command" "'make debug'"))))

  (use-package webkit
    :straight t
    :bind ("s-b" . 'webkit) ;; Bind to whatever global key binding you want if you want
    :init
    (setq webkit-search-prefix "https://duckduckgo.com/search?q=")
			    ; (setq webkit-ace-chars "aoeuidhtns") ;; More convienent if you use dvorak
    ;; (setq webkit-history-filename "~/path/to/webkit-history") ;; If you want history saved in a different place
    ;; (setq webkit-history-filename nil) ;; If you don't want history saved to file (will stay in memory)
    ;; (setq webkit-own-window t) ;; See above explination; must be set before webkit.el is loaded
    ;; (setq browse-url-browser-function 'webkit-browse-url) ; Set as the default browse-url browser
    ;; (setq webkit-browse-url-force-new t) ; Always open a new session instead of reusing a current one
    :config
    (setq webkit-own-window nil)
    ;; (add-hook 'webkit-new-hook #'webkit-enable-javascript)
    )

Evil integration

  ; (use-package evil-collection-webkit
  ;   :straight t
  ;   :config
  ;   (evil-collection-xwidget-setup))