From fa0edc1a86584a6758d8b453ca77fd92340fced6 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Wed, 14 Jun 2017 02:21:28 +0200 Subject: new jao-notify with libnotify --- emms/jao-emms-info-track.el | 4 ++-- emms/jao-emms-random-album.el | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'emms') 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 ;; 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 ;; 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 () -- cgit v1.2.3