-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path90_emms.el.bak
86 lines (78 loc) · 3.22 KB
/
90_emms.el.bak
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
(add-to-list 'load-path (expand-file-name "emms" *init-dir*))
;;; Track Show Format (for playlist buffer)
;;;###autoload
(autoload 'emms-play-playlist "emms-source-playlist" nil t)
(global-set-key (kbd "C-c e l") 'emms-play-playlist)
(require 'emms-setup)
(emms-standard)
;; no cli volume setup tools in windows
;(require 'emms-volume)
(require 'emms-score)
(emms-score 1)
;; autodetect musci files id3 tags encodeing
(require 'emms-i18n)
;; auto-save and import last playlist
(require 'emms-history)
(setq emms-player-mpg321-command-name "mpg123"
emms-player-mplayer-command-name "mplayer"
emms-player-list '(emms-player-mplayer
emms-player-mplayer-playlist
emms-player-ogg123
emms-player-mpg321))
;; my customizable playlist format
(defun bigclean-emms-info-track-description (track)
"Return a description of the current track."
(let ((artist (emms-track-get track 'info-artist))
(title (emms-track-get track 'info-title))
(album (emms-track-get track 'info-album))
(ptime (emms-track-get track 'info-playing-time)))
(if title
(format
"%-35s %-40s %-35s %5s:%-5s"
(if artist artist "")
(if title title "")
(if album album "")
(/ ptime 60)
(% ptime 60)))))
(setq emms-track-description-function
'bigclean-emms-info-track-description)
;; format current track,only display title in mode line
(defun bigclean-emms-mode-line-playlist-current ()
"Return a description of the current track."
(let* ((track (emms-playlist-current-selected-track))
(type (emms-track-type track))
(title (emms-track-get track 'info-title)))
(format "[ %s ]"
(cond ((and title)
title)))))
(setq emms-mode-line-mode-line-function
'bigclean-emms-mode-line-playlist-current)
;; global key-map
;; all global keys prefix is C-c e
;; compatible with emms-playlist mode keybindings
;; you can view emms-playlist-mode.el to get details about
;; emms-playlist mode keys map
(global-set-key (kbd "C-c e s") 'emms-stop)
(global-set-key (kbd "C-c e P") 'emms-pause)
(global-set-key (kbd "C-c e n") 'emms-next)
(global-set-key (kbd "C-c e p") 'emms-previous)
(global-set-key (kbd "C-c e f") 'emms-show)
(global-set-key (kbd "C-c e >") 'emms-seek-forward)
(global-set-key (kbd "C-c e <") 'emms-seek-backward)
;; these keys maps were derivations of above keybindings
(global-set-key (kbd "C-c e S") 'emms-start)
(global-set-key (kbd "C-c e g") 'emms-playlist-mode-go)
(global-set-key (kbd "C-c e t") 'emms-play-directory-tree)
(global-set-key (kbd "C-c e h") 'emms-shuffle)
(global-set-key (kbd "C-c e e") 'emms-play-file)
(global-set-key (kbd "C-c e l") 'emms-play-playlist)
(global-set-key (kbd "C-c e r") 'emms-toggle-repeat-track)
(global-set-key (kbd "C-c e R") 'emms-toggle-repeat-playlist)
(global-set-key (kbd "C-c e u") 'emms-score-up-playing)
(global-set-key (kbd "C-c e d") 'emms-score-down-playing)
(global-set-key (kbd "C-c e o") 'emms-score-show-playing)
;; coding settings
(setq emms-info-mp3info-coding-system 'gbk
emms-cache-file-coding-system 'utf-8
;; emms-i18n-default-coding-system '(utf-8 . utf-8)
)