;; Author: Artur Malabarba <emacs@endlessparentheses.com>
;; URL: https://github.com/Malabarba/beacon
;; Keywords: convenience
;; Author: Artur Malabarba <emacs@endlessparentheses.com>
;; URL: https://github.com/Malabarba/beacon
;; Keywords: convenience
;; Package-Requires: ((seq "1.11"))
;; This program is free software; you can redistribute it and/or modify
;; Package-Requires: ((seq "1.11"))
;; This program is free software; you can redistribute it and/or modify
(defun beacon--color-range ()
"Return a list of background colors for the beacon."
(let* ((default-bg (or (save-excursion
(defun beacon--color-range ()
"Return a list of background colors for the beacon."
(let* ((default-bg (or (save-excursion
(face-attribute 'beacon-fallback-background :background)
default-bg)))
(fg (cond
((stringp beacon-color) (color-values beacon-color))
(face-attribute 'beacon-fallback-background :background)
default-bg)))
(fg (cond
((stringp beacon-color) (color-values beacon-color))
(make-list 3 (* beacon-color 65535)))
(t (make-list 3 (* (- 1 beacon-color) 65535))))))
(apply #'seq-mapn (lambda (r g b) (format "#%04x%04x%04x" r g b))
(make-list 3 (* beacon-color 65535)))
(t (make-list 3 (* (- 1 beacon-color) 65535))))))
(apply #'seq-mapn (lambda (r g b) (format "#%04x%04x%04x" r g b))
;; Blink for switching windows.
((and beacon-blink-when-window-changes
(not (eq beacon--previous-window (selected-window))))
;; Blink for switching windows.
((and beacon-blink-when-window-changes
(not (eq beacon--previous-window (selected-window))))
;; Blink for movement
((beacon--movement-> beacon-blink-when-point-moves-vertically
beacon-blink-when-point-moves-horizontally)
;; Blink for movement
((beacon--movement-> beacon-blink-when-point-moves-vertically
beacon-blink-when-point-moves-horizontally)