 
 ;; These bars regulate the height of the mode-line in GUI Emacs.
 (def-modeline-segment! bar
-  (+doom-modeline--make-xpm
-   (face-background (if (active)
-                        'doom-modeline-bar
-                      'doom-modeline-inactive-bar)
-                    nil t)
-   +doom-modeline-height
-   +doom-modeline-bar-width))
+  (if (display-graphic-p)
+      (+doom-modeline--make-xpm
+       (face-background (if (active)
+                            'doom-modeline-bar
+                          'doom-modeline-inactive-bar)
+                        nil t)
+       +doom-modeline-height
+       +doom-modeline-bar-width)
+    ""))
 
 (def-modeline-segment! eldoc-bar
   "A differently colored bar, to signify an eldoc display."
-  (+doom-modeline--make-xpm
-   (face-background 'doom-modeline-eldoc-bar nil t)
-   +doom-modeline-height
-   +doom-modeline-bar-width))
+  (if (display-graphic-p)
+      (+doom-modeline--make-xpm
+       (face-background 'doom-modeline-eldoc-bar nil t)
+       +doom-modeline-height
+       +doom-modeline-bar-width)
+    ""))
 
 
 ;;

          (active  (active))
          (all-the-icons-scale-factor 1.0)
          (all-the-icons-default-adjust -0.1))
      (concat +doom-modeline-vspc
              (cond ((memq state '(edited added))
                     (if active (setq face 'doom-modeline-info))
                     (all-the-icons-octicon
                      "git-branch"
                      :face face
                      :height 1.2
                      :v-adjust -0.05))

  "Displays `doom-project-root'. This is for special buffers like the scratch
buffer where knowing the current project directory is important."
  (let ((face (if (active) 'doom-modeline-buffer-path)))
    (concat (if (display-graphic-p) " ")
            (all-the-icons-octicon
             "file-directory"
             :face face
             :v-adjust -0.05
