diff options
Diffstat (limited to 'lib/media/jao-mpc.el')
-rw-r--r-- | lib/media/jao-mpc.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/media/jao-mpc.el b/lib/media/jao-mpc.el index 82c38ba..2dfec76 100644 --- a/lib/media/jao-mpc.el +++ b/lib/media/jao-mpc.el @@ -30,6 +30,7 @@ (require 'jao-themes) (require 'jao-lyrics) (require 'jao-random-album) +(require 'jao-notify) (defconst jao-mpc--albums "*MPC Albums*") (defconst jao-mpc--playlist "*MPC Playlist*") @@ -257,6 +258,20 @@ (message "Playing time: %s" (jao-mpc--current-timestr t))) ;;;###autoload +(defun jao-mpc-notify (&optional port) + (interactive) + (when-let* ((current (jao-mpc--current))) + (let* ((artist (alist-get 'artist current)) + (title (alist-get 'title current)) + (album (alist-get 'album current)) + (track (alist-get 'track current)) + (times (jao-mpc--current-timestr t current))) + (jao-notify (format "%s -- %s" artist times) + (format "%s %s" track title) + jao-notify-audio-icon + album)))) + +;;;###autoload (defun jao-mpc-add-url (url) (interactive "sURL: ") (jao-mpc--cmd (format "add %s" url))) |