diff options
author | Yoni Rabkin <yoni@rabkins.net> | 2019-01-04 16:12:40 -0500 |
---|---|---|
committer | Yoni Rabkin <yoni@rabkins.net> | 2019-01-04 16:12:40 -0500 |
commit | de5643494ae61617aa247b00d42d84b84ea9b12e (patch) | |
tree | a495795e68080fdecfb6d10dec06f9c28dfad648 | |
parent | 52c5080f2ee8d9c499ab12a3ba5b2b5585f5063c (diff) |
* lisp/emms-mode-line-icon.el: allow changing icon
Allow the icon's color to be changed easily.
-rw-r--r-- | lisp/emms-mode-line-icon.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emms-mode-line-icon.el b/lisp/emms-mode-line-icon.el index 85d9674..82cf815 100644 --- a/lisp/emms-mode-line-icon.el +++ b/lisp/emms-mode-line-icon.el @@ -42,13 +42,13 @@ For example, if you want to have something like : \[ <icon> Foo - The Foo Song ] You should set it to \"[\", and set emms-mode-line-format to \"%s ]\"") -(defvar emms-mode-line-icon-image-cache - `(image :type xpm :ascent center :data ,(concat "/* XPM */ +(defun emms-mode-line-icon-generate (color) + `(image :type xpm :ascent center :data ,(concat "/* XPM */ static char *note[] = { /* width height num_colors chars_per_pixel */ \" 10 11 2 1\", /* colors */ -\". c " emms-mode-line-icon-color "\", +\". c " color "\", \"# c None s None\", /* pixels */ \"###...####\", @@ -63,11 +63,12 @@ static char *note[] = { \"######....\", \"#######..#\"};"))) - (defun emms-mode-line-icon-function () (concat " " emms-mode-line-icon-before-format - (emms-propertize "NP:" 'display emms-mode-line-icon-image-cache) + (emms-propertize "NP:" 'display + (emms-mode-line-icon-generate + emms-mode-line-icon-color)) (emms-mode-line-playlist-current))) (setq emms-mode-line-mode-line-function 'emms-mode-line-icon-function) |