summaryrefslogtreecommitdiff
path: root/.config/emacs/modules/bd--browse.el
blob: 1dd5b4a00639db3da6634a63d7706f58eaa61ba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;;; -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:


;; do not use an external browser
(setopt browse-url-browser-function 'eww-browse-url
        shr-use-fonts t
        shr-cookie-policy nil
        shr-max-width 85
        ;; send only user agent
        url-privacy-level '(email os emacs lastloc cookies)
        eww-search-prefix "https://duckduckgo.com/html/?q="
        eww-auto-rename-buffer 'title
        eww-use-browse-url (regexp-opt '("mailto:"
                                         "youtube.com"
                                         "youtu.be"))
        browse-url-handlers
        `((,(regexp-opt'("youtube.com" "youtu.be")) .
           (lambda (url &rest _)
             (message "Ludu %s" url)
             (start-process-shell-command "rip-video" nil (concat "rip-video " url))))))


(provide 'bd--browse)
;;; bd-browse ends here