 
 ;; 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 ()

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

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

(global-hl-line-mode)
;; Turn off unbroken single line wrap indicators
(fringe-mode '(0 . 0))
;; Graphical mode tweaks
(when (display-graphic-p)
  ;; fix emacs.app colors on macOS
  (when (string-equal system-type 'darwin)
    (setq ns-use-srgb-colorspace nil))

  ;; enable base16-dracula theme for emacs
  (setq custom-safe-themes t)
  (load-theme 'base16-dracula t)

  ;; telephone-line settings
  (setq telephone-line-primary-left-separator 'telephone-line-cubed-left
        telephone-line-secondary-left-separator 'telephone-line-cubed-hollow-left
        telephone-line-primary-right-separator 'telephone-line-cubed-right
        telephone-line-secondary-right-separator 'telephone-line-cubed-hollow-right)
  (setq telephone-line-height 24
        telephone-line-evil-use-short-tag t))

;; Load telephone-line
(telephone-line-mode 1)
;; Font settings
(custom-set-faces
 ;; '(default ((t (:inherit nil :stipple nil :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 140 :width normal :foundry "nil" :family "Meslo LG M for Powerline"))))
 '(default ((t (:weight normal :height 140 :width normal :foundry "nil" :family "Meslo LG M for Powerline")))))

;; eshell settings
;; eshell prompt
