Function: mpc-notifications-notify

mpc-notifications-notify is a byte-compiled function defined in mpc.el.gz.

Signature

(mpc-notifications-notify)

Documentation

Display a notification with information about the current song.

Source Code

;; Defined in /usr/src/emacs/lisp/mpc.el.gz
(defun mpc-notifications-notify ()
  "Display a notification with information about the current song."
  (when-let* ((mpc-notifications)
              ((notifications-get-server-information))
              ((string= "play" (alist-get 'state mpc-status)))
              (title (mpc--notifications-format mpc-notifications-title))
              (body (mpc--notifications-format mpc-notifications-body))
              (icon (or (mpc-cover-image-find (alist-get 'file mpc-status))
                        notifications-application-icon)))
    (setq mpc--notifications-id
          (notifications-notify :title title
                                :body body
                                :app-icon icon
                                :replaces-id mpc--notifications-id))))