-
Notifications
You must be signed in to change notification settings - Fork 9
/
osx.el
34 lines (27 loc) · 1.01 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
;;; osx.el --- OSX related configuration -*- lexical-binding: t; -*-
;; ;; Switch the Cmd and Meta keys
;; (setq mac-option-key-is-meta nil)
;; (setq mac-command-key-is-meta t)
;; (setq mac-command-modifier 'meta)
;; (setq mac-option-modifier nil)
(setq-default mac-command-modifier 'alt)
;; Menu bar is not annoying in OSX
(menu-bar-mode 1)
;; Make the browser the OS X default
(setq browse-url-browser-function 'browse-url-default-macosx-browser)
;; ;; In dired, move deletions to trash
;; (setq delete-by-moving-to-trash t)
;; ;; Set font
;; (set-default-font "-apple-Source_Code_Pro-medium-normal-normal-*-*-*-*-*-m-0-iso10646-1")
(defun finder ()
"Opens file directory in Finder."
(interactive)
(let ((file (buffer-file-name)))
(if file
(shell-command
(format "%s %s" (executable-find "open") (file-name-directory file)))
(error "Buffer is not attached to any file."))))
;; Use GNU ls - install with:
;; brew install xz
;; brew install coreutils
(setq insert-directory-program "gls")