blob: 31ff15ba251873a46850bab69fc94e9f8da0645e (
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
27
28
29
30
31
32
33
34
35
36
37
38
|
;; -*- lexical-binding: t; -*-
;;;; chromium
;; less chromium the better
(defun chromium (url)
"Given a user url or search term, opens chromium
in application mode. Application mode removes foreign
tabs and search bars, better integrating with emacs."
(interactive "sEnter url or keywords: ")
(setq url (eww--dwim-expand-url url))
(start-process-shell-command "chromium" nil (concat "chromium --incognito --app=\"" url "\"")))
;;(defun bd/eww-open-chromium
;;;; eww
;; 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://searx.be/search?q="
eww-auto-rename-buffer 'title
eww-use-browse-url (regexp-opt '("mailto:"
"youtube.com"
"youtu.be"
"yewtu.be"
"vid.puffyan.us"))
browse-url-handlers
`((,(regexp-opt'("youtube.com" "youtu.be" "yewtu.be" "vid.puffyan.us")) .
(lambda (url &rest _)
(message "Ludu %s" url)
(start-process-shell-command "rip-video" nil (concat "rip-video " url))))))
(provide 'bd--eww)
|