-
Notifications
You must be signed in to change notification settings - Fork 0
/
tlh-osx.el
49 lines (35 loc) · 1.5 KB
/
tlh-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
;;; osx configs
(defun osx-play-sound (filename)
(call-process "afplay" nil 0 nil filename))
(defun osx-notify (title msg)
(call-process "growlnotify" nil 0 nil title "-a" "Emacs" "-m" msg))
(defun osx-set-volume (vol)
(do-applescript (format "set volume %s" (rescale vol 0 100 0 7))))
(defun osx-get-volume ()
(do-applescript "output volume of (get volume settings)"))
(defun osx-toggle-show-hidden-files ()
(interactive)
(call-process "osx-toggle-show-hidden-files"))
;;; general settings
(setq mac-command-modifier 'meta
mac-option-modifier 'hyper
mac-function-modifier 'super
ns-antialias-text t
delete-by-moving-to-trash t
trash-directory (home-path ".Trash/")
browse-url-browser-function 'browse-url-default-macosx-browser
fortune-dir "/opt/local/share/games/fortune/"
fortune-file "/opt/local/share/games/fortune/"
ding-sound "/System/Library/Sounds/Pop.aiff"
yell-sound "/System/Library/Sounds/Basso.aiff"
volume-change-sound "/System/Library/Sounds/Pop.aiff"
volume-play-sound-on-change t
play-sound-function 'osx-play-sound
notify-function 'osx-notify
set-volume-function 'osx-set-volume
get-volume-function 'osx-get-volume
)
(set-frame-parameter nil 'font "Menlo-12")
;;; provide
(provide 'tlh-osx)
;;; tlh-osx.el ends here