Random mode-line color

/ Published in: Emacs Lisp
Save to your folder(s)

When called, this function sets the background color of the mode-line to one of the defined colors randomly.

Copy this code and paste it in your HTML
  1. (defun set-random-mode-line-background() (interactive)
  2. (setq ncolors (length (defined-colors)))
  3. (random t)
  4. (set-face-background 'mode-line (nth (random ncolors) (defined-colors))))

URL: set-random-mode-line-background

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.