summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bongo.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/bongo.el b/bongo.el
index 09919e5..7aa33ec 100644
--- a/bongo.el
+++ b/bongo.el
@@ -78,6 +78,7 @@ This is used since my music directories used to contain symbolic links.")
(define-key bongo-dired-library-mode-map [?\C-c ?n] #'durand-bongo-play-next-or-first)
(define-key bongo-dired-library-mode-map [?\C-c ?p] #'durand-bongo-play-previous-or-last)
(define-key bongo-playlist-mode-map [?\C-d] #'prot/bongo-clear-playlist-and-stop)
+ (define-key bongo-playlist-mode-map [?x] #'durand-bongo-stop-and-exit)
(define-key bongo-playlist-mode-map [?I] #'durand-bongo-insert-delete-playlist)
(define-key bongo-dired-library-mode-map [C-return] #'prot/bongo-library-insert-and-play-random)
@@ -144,6 +145,8 @@ buffer."
(bongo-stop)
(bongo-erase-buffer)))
+
+
;;;###autoload
(defun prot/bongo-play-random ()
"Play a random track with `bongo' and set random playback."
@@ -615,6 +618,19 @@ Modified by Durand."
(advice-add #'bongo-default-playlist-buffer :override #'durand-bongo-default-playlist-buffer-a)
)
+;;; Stop playing and exit and kill the buffer
+
+(defun durand-bongo-stop-and-exit ()
+ "Stop playing and exit and kill the buffer."
+ (interactive)
+ (bongo-stop)
+ (bongo-erase-buffer)
+ (cond
+ (bongo-player
+ (bongo-player-stop bongo-player)
+ (setq bongo-player nil)))
+ (kill-buffer))
+
;;; Improved bongo-mpv backend
;;;; Disable the tick timer as soon as possible