summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.el11
-rw-r--r--lib/media/jao-mpc.el3
-rw-r--r--lib/media/jao-random-album.el12
3 files changed, 13 insertions, 13 deletions
diff --git a/init.el b/init.el
index c54220c..e3c56f9 100644
--- a/init.el
+++ b/init.el
@@ -2967,9 +2967,13 @@
(interactive)
(jao-mpc-show-playlist jao-mopidy-port))
-(use-package jao-random-album :demand t)
-
-(jao-def-exec-in-term "aptitude" "aptitude" (jao-afio-goto-scratch))
+(use-package jao-random-album
+ :demand t
+ :config
+ (defun jao--notify-album (album)
+ (jao-notify album "Next album" jao-notify-audio-icon)
+ (jao-minibuffer-refresh))
+ (setq jao-random-album-notify #'jao--notify-album))
(defun jao-toggle-pasystray-applet ()
(interactive)
@@ -3257,6 +3261,7 @@
(outline-show-entry))
((derived-mode-p 'org-mode) (org-reveal))))
+(jao-def-exec-in-term "aptitude" "aptitude" (jao-afio-goto-scratch))
(jao-def-exec-in-term "htop" "htop" (jao-afio-goto-scratch))
(transient-define-prefix jao-transient-utils ()
diff --git a/lib/media/jao-mpc.el b/lib/media/jao-mpc.el
index 52fdfbf..ab8823f 100644
--- a/lib/media/jao-mpc.el
+++ b/lib/media/jao-mpc.el
@@ -311,8 +311,7 @@
(setq jao-lyrics-info-function #'jao-mpc-lyrics-track-data)
(jao-random-album-setup #'jao-mpc--album-buffer
#'jao-mpc--add-and-play
- #'jao-mpc-stop
- jao-notify-audio-icon)
+ #'jao-mpc-stop)
(let ((jao-random-album-active nil)) (jao-mpc-connect))
(when secondary-port (jao-mpc-connect secondary-port))
(when priority
diff --git a/lib/media/jao-random-album.el b/lib/media/jao-random-album.el
index 5b10308..3b2915b 100644
--- a/lib/media/jao-random-album.el
+++ b/lib/media/jao-random-album.el
@@ -18,13 +18,10 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
-(require 'jao-notify)
-
(defvar jao-random-album-active t)
(defvar jao-random-lines nil)
(defvar jao-random-lines-file (expand-file-name "~/.emacs.d/random-lines"))
-(defvar jao-random-album-notify t)
-(defvar jao-random-album-notify-icon jao-notify-audio-icon)
+(defvar jao-random-album-notify nil)
(defvar jao-random-album-skip-lines 2)
(defun jao-random-lines ()
@@ -81,18 +78,17 @@
(let ((album (string-trim (thing-at-point 'line))))
(funcall jao-random-album-add-tracks-and-play album)
(when jao-random-album-notify
- (jao-notify album "Next album" jao-random-album-notify-icon)))))
+ (funcall jao-random-album-notify album)))))
(defun jao-random-album-reset ()
(interactive)
(setq jao-random-lines nil)
(jao-random-lines-save))
-(defun jao-random-album-setup (album-buffer add-and-play stop &optional icon)
+(defun jao-random-album-setup (album-buffer add-and-play stop)
(setq jao-random-album-buffer album-buffer
jao-random-album-add-tracks-and-play add-and-play
- jao-random-album-stop stop
- jao-random-album-notify-icon icon))
+ jao-random-album-stop stop))
(provide 'jao-random-album)