[Music] Move customizable variables into db-music.el

master
Daniel Borchmann 4 years ago
parent 402bfc7643
commit c309cf7917
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
  1. 14
      init.el
  2. 5
      site-lisp/db-emms.el
  3. 19
      site-lisp/db-music.el

@ -2145,23 +2145,11 @@ search commands like `db/helm-shortcuts’."
(require 'helm-adaptive)))
(use-package db-music
:init (setq db/playlist-play-function #'db/play-playlist-from-git-annex-find)
:commands (db/play-playlist-from-cache
db/play-playlist-from-git-annex-find
db/update-playlist-from-directory))
(defcustom db/playlist-play-function #'db/play-playlist-from-cache
"Function to use to automatically generate playlists"
:group 'personal-settings
:type 'function)
(defcustom db/playlist nil
"List of songs to include in a random playlist."
:group 'personal-settings
:type '(alist :value-type (choice (const :tag "Undecided" :undecided)
(const :tag "Include" :include)
(const :tag "Exclude" :exclude))
:key-type file))
;; * Shells and such

@ -130,7 +130,10 @@ _RET_: ?RET? _M_: ?M?
("-" emms-volume-lower "lower volume")
("+" emms-volume-raise "raise volume")
("M" emms "show playlist")
("P" (funcall db/playlist-play-function)
("P" (lambda ()
(interactive)
(require 'db-music)
(call-interactively db/playlist-play-function))
"Play automatically generated playlist"))

@ -7,6 +7,25 @@
(require 'dash)
(require 'emms)
(defgroup db-music nil
"General configurations for music-related functionality."
:prefix "db-music"
:group 'convenience
:tag "db-music")
(defcustom db/playlist-play-function #'db/play-playlist-from-cache
"Function to use to automatically generate playlists"
:group 'db-music
:type 'function)
(defcustom db/playlist nil
"List of songs to include in a random playlist."
:group 'db-music
:type '(alist :value-type (choice (const :tag "Undecided" :undecided)
(const :tag "Include" :include)
(const :tag "Exclude" :exclude))
:key-type file))
(defun db/-emms-playlist-from-files (files)
"Generate EMMS playlist from FILES.

Loading…
Cancel
Save