blob: f7828ea578fdf1cf6116bd024af177fb7a0592f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
;; -*- lexical-binding: t; -*-
(require 'emms)
(add-to-list 'display-buffer-alist
`(,emms-playlist-buffer-name
(display-buffer-in-side-window)
(side . right)
(window-width . 45)))
(defun emms-quickstart ()
"Queues a shuffled playlist and starts
playback."
(interactive)
(emms-stop)
(when (bufferp emms-playlist-buffer-name)
(kill-buffer emms-playlist-buffer-name))
(emms-play-directory-tree (expand-file-name "~/Personal/mpd/music/"))
(emms-shuffle))
(use-package emms
:bind (("C-z C-s" . 'emms-quickstart)
("C-z C-p" . 'emms-play-playlist))
:config
(emms-all)
(add-to-list 'emms-info-functions 'emms-info-functions 'emms-info-mpd)
(add-to-list 'emms-player-list 'emms-player-mpd)
(keymap-global-set "C-z C-m" (lambda ()
(interactive)
(if (get-buffer emms-playlist-buffer-name)
(progn (display-buffer emms-playlist-buffer-name)
(select-window (get-buffer-window emms-playlist-buffer-name)))
(message "The Ainur cannot hear you..."))))
:custom
;; make sure mpd is configured similarly
(emms-player-mpd-server-name "localhost")
(emms-player-mod-server-port "6600")
;; set dir and volume keys
(emms-player-mpd-music-directory (expand-file-name "~/Personal/mpd/music/"))
(emms-source-file-default-directory (expand-file-name "~/Personal/mpd/playlists/"))
(emms-volume-change-function 'emms-volume-mpd-change)
;; misc
(emms-mode-line-format "%s ")
(emms-playlist-buffer-name "*Playlist*")
(require 'all-the-icons)
(emms-mode-line-icon-before-format (format "%s" (all-the-icons-fileicon "owl")))
(emms-mode-line-icon-enabled-p t))
(provide 'bd--emms)
|