;;;###autoload (defun modeline-format-main () "The main mode line format." (let ((left (modeline-format-left)) (right (modeline-format-right)) (left-len (length left)) (right-len (length right)) (middle (propertize " " 'display (make-string (- (window-width) left-len right-len) 32)))) (concat left middle right))) ;;;###autoload (defun modeline-format-left () "The left mode line format." ) ;;;###autoload (defvar modeline-bar-width 3 "The width of the mode line bar") ;;;###autoload (defvar modeline-bar-height 27 "The height of the mode line bar") ;;;###autoload (defun modeline-format-bar () "We need a bar to ensure the mode line has the specified height." (cond ((and (display-graphic-p) (image-type-available-p 'xpm)) (propertize " " 'display (let ((data (make-list modeline-bar-height (make-list modeline-bar-width 97))) (color (face-background 'modus-theme-active-blue nil t))) (ignore-errors (create-image (concat "/* XPM */\nstatic char * bar[]={\n" (format "\"%d %d 1 1\",\n\"a c %s\",\n" modeline-bar-width modeline-bar-height color) (mapconcat (lambda (row) (format "\"%s\"" (apply #'string row))) data ",\n") "\n};") 'xpm t :ascent 'center))))))) ;;;###autoload (defun modeline-format-right () "The right mode line format.") (setq mode-line-format '("%e" (:eval (modeline-format-main))))