summaryrefslogtreecommitdiffhomepage
path: root/emms/jao-emms-random-album.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@imladris.local>2017-06-14 02:21:28 +0200
committerJose Antonio Ortega Ruiz <jao@imladris.local>2017-06-14 02:21:28 +0200
commitfa0edc1a86584a6758d8b453ca77fd92340fced6 (patch)
tree1dee058c0b517cf76f3cc6105d7e28104c41eed7 /emms/jao-emms-random-album.el
parentec9adfba23a9dbfe1e617d7a002ea5c73f1ca82f (diff)
downloadelibs-fa0edc1a86584a6758d8b453ca77fd92340fced6.tar.gz
elibs-fa0edc1a86584a6758d8b453ca77fd92340fced6.tar.bz2
new jao-notify with libnotify
Diffstat (limited to 'emms/jao-emms-random-album.el')
-rw-r--r--emms/jao-emms-random-album.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/emms/jao-emms-random-album.el b/emms/jao-emms-random-album.el
index 04dcd89..b959e36 100644
--- a/emms/jao-emms-random-album.el
+++ b/emms/jao-emms-random-album.el
@@ -1,6 +1,6 @@
;; jao-emms-random-album.el -- play random albums in emms
-;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2017 Jose Antonio Ortega Ruiz
;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
;; Start date: Sat Jul 04, 2009 13:06
@@ -25,6 +25,8 @@
(defvar jao-emms-random-lines nil)
(defvar jao-emms-random-lines-file
(expand-file-name "~/.emacs.d/random-lines"))
+(defvar jao-emms-random-album-notify-p t)
+(defvar jao-emms-random-album-notify-icon nil)
(defun jao-emms-random-lines ()
(or jao-emms-random-lines
@@ -94,10 +96,10 @@
(emms-browse-by-album)
(jao-emms-goto-random-album)
(emms-browser-add-tracks-and-play)
- (jao-osd-cat 'emms
- (format "Next album %s"
- (substring-no-properties (thing-at-point 'line)
- 0 -1)))
+ (when jao-emms-random-album-notify-p
+ (jao-notify (substring-no-properties (thing-at-point 'line) 0 -1)
+ "Next album"
+ jao-emms-random-album-notify-icon))
(emms-browser-bury-buffer))))
(defun jao-emms-random-album-reset ()