From 3e96ae1ade23eee42b63ed047682b7cbf430f7d8 Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 1 Oct 2025 17:23:20 +0100 Subject: jao-mpc tweaks (mainly notifications) --- init.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 7434c2f..ff43e11 100644 --- a/init.el +++ b/init.el @@ -597,7 +597,7 @@ ;;;; jao-notify (use-package jao-notify :demand t - :init (setq jao-notify-use-messages t)) + :init (setq jao-notify-use-messages (jao-d-l 'mac t))) ;;;; tracking (use-package tracking @@ -1668,7 +1668,7 @@ (jao-defun-play next) (jao-defun-play previous) (jao-defun-play stop) -(jao-defun-play echo echo-current-times) +(jao-defun-play echo echo-current) (jao-defun-play list show-playlist) (jao-defun-play info lyrics-track-data) (jao-defun-play browse show-albums) @@ -1687,23 +1687,24 @@ (defun jao-player-seek-10 () (interactive) (jao-player-seek 10)) (defun jao-player-seek--10 () (interactive) (jao-player-seek -10)) -(defun jao-streaming-clear () (interactive) (jao-mpc-clear jao-mopidy-port)) +(defun jao-streaming-clear () (interactive) (jao-mpc-clear)) (defun jao-streaming-echo-current () (interactive) - (jao-mpc-echo-current jao-mopidy-port)) + (jao-d-l (let ((inhibit-message t)) (jao-mpc-notify)) + (jao-mpc-echo-current))) (defun jao-streaming-show-playlist () (interactive) - (jao-mpc-show-playlist jao-mopidy-port)) + (jao-mpc-show-playlist)) (use-package jao-random-album :demand t :config (defun jao--notify-album (album) - (unless jao-minibuffer-mode - (jao-notify album "Next album" jao-notify-audio-icon)) - (jao-minibuffer-refresh)) + (if jao-minibuffer-mode + (jao-minibuffer-refresh) + (jao-notify album "Next album" jao-notify-audio-icon ""))) (setq jao-random-album-notify #'jao--notify-album)) (transient-define-prefix jao-transient-media () @@ -1721,7 +1722,7 @@ ("b" "browse" jao-player-browse) ("l" "show play list" jao-player-list) ("L" "show lyrics" jao-show-lyrics) - ("w" "now playing" jao-player-echo)] + ("w" "now playing" jao-streaming-echo-current)] [:description (lambda () (message "mpd %s" (if (jao-mpc-playing-p) @@ -1747,7 +1748,7 @@ (global-set-key (kbd "s-m") #'jao-transient-media) -(jao-mpc-setup nil 70) +(jao-mpc-setup nil (jao-when-linux 70)) ;;; Graphical window system -- cgit v1.2.3