diff options
Diffstat (limited to 'modeline.el')
-rw-r--r-- | modeline.el | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/modeline.el b/modeline.el index 91b5b17..49ad135 100644 --- a/modeline.el +++ b/modeline.el @@ -58,7 +58,6 @@ (defun modeline-format-left () "The left mode line format." (concat - ;; (modeline-format-bar) (modeline-spc) (modeline-format-buffer-status) (modeline-spc) @@ -228,124 +227,6 @@ MAP is the local keymap of the text." (t 'mode-line-inactive)))) ;;;###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 -(defvar modeline-bar-color (face-background 'modus-theme-active-blue nil t) - "The color for the bar of the mode line.") - -;;;###autoload -(defvar modeline-bar-color-inactive (face-foreground 'mode-line-inactive) - "The color for the bar of inactive mode lines.") - -;;;###autoload -(defvar modeline-bar-img - (propertize - " " 'display - (let ((data (make-list modeline-bar-height - (make-list modeline-bar-width 97))) - (color modeline-bar-color)) - (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)))) - "The image for the bar in the mode line.") - -;;;###autoload -(defvar modeline-bar-img-inactive - (propertize - " " 'display - (let ((data (make-list modeline-bar-height - (make-list modeline-bar-width 97))) - (color modeline-bar-color-inactive)) - (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)))) - "The image for the bar in inactive mode lines.") - -;;;###autoload -(defun modeline-refresh-bars (&optional w h) - "Refresh the bar images. -W is the width, H is the height of the bar." - (setq modeline-bar-width (or w modeline-bar-width) - modeline-bar-height (or h modeline-bar-height) - modeline-bar-img - (propertize - " " 'display - (let ((data (make-list modeline-bar-height - (make-list modeline-bar-width 97))) - (color modeline-bar-color)) - (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)))) - modeline-bar-img-inactive - (propertize - " " 'display - (let ((data (make-list modeline-bar-height - (make-list modeline-bar-width 97))) - (color modeline-bar-color-inactive)) - (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-bar () - "We need a bar to ensure the mode line has the specified height." - (cond - ((and (display-graphic-p) - (image-type-available-p 'xpm)) - (cond ((modeline-active-window-p) modeline-bar-img) - (t modeline-bar-img-inactive))))) - -;;;###autoload (defun modeline-format-buffer-status () "The status of the buffer displayed on the mode-line." (let ((active-p (modeline-active-window-p))) |