-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathosx.el
62 lines (39 loc) · 1.67 KB
/
osx.el
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
;; OSX specific configuration
(set-frame-font "Courier New 16")
(defun live-copy-from-osx ()
(shell-command-to-string "pbpaste"))
(defun live-paste-to-osx (text &optional push)
(let ((process-connection-type nil))
(let ((proc (start-process "pbcopy" "*Messages*" "pbcopy")))
(process-send-string proc text)
(process-send-eof proc))))
(setq interprogram-cut-function 'live-paste-to-osx)
(setq interprogram-paste-function 'live-copy-from-osx)
;; Work around a bug on OS X where system-name is a fully qualified
;; domain name
(setq system-name (car (split-string system-name "\\.")))
(global-unset-key (kbd "s-p"))
(global-unset-key (kbd "s-q"))
(global-unset-key (kbd "M-TAB"))
;;; Set the path properly
(setenv "PATH"
(concat
"/usr/local/bin" ":"
(getenv "PATH")))
(setq exec-path
(append '("/usr/local/bin") exec-path))
;; Set env for finding and running perl scripts
(setq exec-path (append exec-path (cons (expand-file-name "~/perl5/bin/") '())))
(setenv "PERL5LIB" (expand-file-name "~/perl5/lib/perl5"))
;; For finding and running tools written rust
(setq exec-path (append exec-path (cons (expand-file-name "~/.cargo/bin/") '())))
(setq locate-command "mdfind")
(custom-set-variables '(epg-gpg-program "/usr/local/bin/gpg"))
(setq epa-pinentry-mode 'loopback)
;; Custom uuidgen implementation to generate lower case uuids on
;; MacOS. The `uuidgen-lower` script is available under `bin/`
;; directory that needs to be copied to a directory in PATH
(if (executable-find "uuidgen-lower")
(setq my/uuidgen-program (setq org-id-uuid-program (executable-find "uuidgen-lower")))
(setq my/uuidgen-program "uuidgen"))
(provide 'osx)