-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchromium.el
More file actions
24 lines (18 loc) · 763 Bytes
/
chromium.el
File metadata and controls
24 lines (18 loc) · 763 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
;;; run command at save (will move to another file?)
;(add-hook
; 'after-save-hook
; 'reload-extension)
(defun string/starts-with (string prefix)
"Return t if STRING starts with prefix."
(and (string-match (rx-to-string `(: bos ,prefix) t)
string)
t))
(defun reload-extension ()
(interactive)
(let ((default-directory "/x/code/nuevo/"))
(shell-command "echo $PWD && make && chromium http://reload.extensions")))
; (if (string/starts-with (file-name-directory (buffer-file-name))
; "/x/code/nuevo/chrome")
; ; (equal "/x/code/nuevo/chrome/" (file-name-directory (buffer-file-name)))
; (shell-command "make && chromium http://reload.extensions")))
;(global-set-key (read-kbd-macro "s-'") #'reload-extension)