 
 ;; Use command as meta if running on macOS
 (when
-    (string-equal system-type "darwin")
-  (progn
-    (setq mac-command-modifier 'meta
-          mac-option-modifier nil)))
+    (and (string-equal system-type "darwin") (display-graphic-p)
+         (setq mac-command-modifier 'meta
+               mac-option-modifier nil)))
 
 ;; open init.el in a new window on the right
 (global-set-key (kbd "C-c i") (lambda ()

  (load bootstrap-file nil 'nomessage))

;; install packages
;; base16 theme for emacs
(straight-use-package 'base16-theme)
(require 'base16-theme)
;; git integration
(straight-use-package 'magit)
;; undo-tree
(straight-use-package 'undo-tree)
(global-undo-tree-mode)
;; vim-like bindings for emacs
(straight-use-package 'evil)
(require 'evil)
(evil-mode 1)
;; dash
(straight-use-package 'dash)
;; monitor
(straight-use-package 'monitor)
;; goto-chg
(straight-use-package 'goto-chg)
;; evil-integration for org-mode
(straight-use-package 'org-evil)
(require 'org-evil)

                                  (interactive)
                                  (split-window-right)
                                  (other-window 1)
                                  (find-file '"~/.emacs.d/init.el")))

;; avy bindings
(global-set-key (kbd "C-;") 'avy-goto-char)
(global-set-key (kbd "C-'") 'avy-goto-line)

;; evil bindings
;; Type 'jk' to exit insert mode
