summaryrefslogtreecommitdiffstats
path: root/lisp/init-mac.el
diff options
context:
space:
mode:
authorMartin Polden <martin.polden@gmail.com>2014-03-14 18:44:13 +0100
committerMartin Polden <martin.polden@gmail.com>2014-03-14 18:44:13 +0100
commit348c184925e7ff8b399e0c52df178ac76853f49d (patch)
tree68cfb8a54e42ae5834de4e1a4a62939a1a249d1f /lisp/init-mac.el
parent5fffa0575248c65c45e8255aea23c4304f179321 (diff)
Split up config into multiple files
Diffstat (limited to 'lisp/init-mac.el')
-rw-r--r--lisp/init-mac.el32
1 files changed, 32 insertions, 0 deletions
diff --git a/lisp/init-mac.el b/lisp/init-mac.el
new file mode 100644
index 0000000..ba9bb2e
--- /dev/null
+++ b/lisp/init-mac.el
@@ -0,0 +1,32 @@
+;; mac-specific settings
+(when (eq system-type 'darwin)
+ ;; set font
+ (set-face-attribute 'default nil :family "Source Code Pro")
+ (set-face-attribute 'default nil :height 140)
+
+ ;; configure modifiers
+ (setq mac-option-modifier 'super)
+ (setq mac-command-modifier 'meta)
+ (setq ns-function-modifier 'hyper)
+
+ ;; Norwegian mac-keyboard
+ (define-key key-translation-map (kbd "s-8") (kbd "["))
+ (define-key key-translation-map (kbd "s-(") (kbd "{"))
+ (define-key key-translation-map (kbd "s-9") (kbd "]"))
+ (define-key key-translation-map (kbd "s-)") (kbd "}"))
+ (define-key key-translation-map (kbd "s-7") (kbd "|"))
+ (define-key key-translation-map (kbd "s-/") (kbd "\\"))
+ (define-key key-translation-map (kbd "M-s-7") (kbd "M-|")))
+
+ ;; don't open files from the workspace in a new frame
+ (setq ns-pop-up-frames nil)
+
+ ;; move deleted files to ~/.Trash
+ (setq delete-by-moving-to-trash t
+ trash-directory "~/.Trash/emacs")
+
+ ;; use path from shell
+ (require-package 'exec-path-from-shell)
+ (exec-path-from-shell-initialize)
+
+(provide 'init-mac)