-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathosx.el
36 lines (28 loc) · 1 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
;;; 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)
;; 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-face-attribute 'default nil :family "Source Code Pro" :height 130)
(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")
(use-package exec-path-from-shell
:init (exec-path-from-shell-initialize))