summaryrefslogtreecommitdiffhomepage
path: root/emms
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
parentec9adfba23a9dbfe1e617d7a002ea5c73f1ca82f (diff)
downloadelibs-fa0edc1a86584a6758d8b453ca77fd92340fced6.tar.gz
elibs-fa0edc1a86584a6758d8b453ca77fd92340fced6.tar.bz2
new jao-notify with libnotify
Diffstat (limited to 'emms')
-rw-r--r--emms/jao-emms-info-track.el4
-rw-r--r--emms/jao-emms-random-album.el12
2 files changed, 9 insertions, 7 deletions
diff --git a/emms/jao-emms-info-track.el b/emms/jao-emms-info-track.el
index cf4163b..04f4784 100644
--- a/emms/jao-emms-info-track.el
+++ b/emms/jao-emms-info-track.el
@@ -1,6 +1,6 @@
;; jao-emms-info-track.el -- utilities to show tracks
-;; Copyright (C) 2009, 2010, 2013 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2013, 2017 Jose Antonio Ortega Ruiz
;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
;; Start date: Sat Jul 04, 2009 13:47
@@ -103,7 +103,7 @@
(defun jao-emms-show-osd ()
(interactive)
(let ((str (jao-emms-current-track-str)))
- (when str (jao-osd-cat 'emms (substring str 2)))
+ (when str (jao-notify (substring str 2)))
t))
(defun jao-emms-show-osd-hook ()
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 ()