emacs: Move EMMS settings to init.org
This commit is contained in:
parent
9223d0e998
commit
8fddc0d0a7
3 changed files with 46 additions and 36 deletions
|
@ -23,7 +23,6 @@
|
||||||
"Face for the supposedly empty line in commit messages."
|
"Face for the supposedly empty line in commit messages."
|
||||||
:group 'local)
|
:group 'local)
|
||||||
|
|
||||||
(eval-after-load "emms-source-file" '(oni:emms-init))
|
|
||||||
(eval-after-load "flymake" '(oni:flymake-init))
|
(eval-after-load "flymake" '(oni:flymake-init))
|
||||||
(eval-after-load "ido" '(oni:ido-init))
|
(eval-after-load "ido" '(oni:ido-init))
|
||||||
(eval-after-load "jabber" '(oni:jabber-init))
|
(eval-after-load "jabber" '(oni:jabber-init))
|
||||||
|
@ -98,7 +97,6 @@
|
||||||
(tool-bar-lines . nil)
|
(tool-bar-lines . nil)
|
||||||
(font . "Envy Code R:pixelsize=18")))
|
(font . "Envy Code R:pixelsize=18")))
|
||||||
(setq elnode-do-init nil)
|
(setq elnode-do-init nil)
|
||||||
(setq emms-source-file-default-directory "/mnt/music/")
|
|
||||||
(setq erc-autojoin-channels-alist
|
(setq erc-autojoin-channels-alist
|
||||||
'(("freenode.net" "#ninthfloor" "#emacs")))
|
'(("freenode.net" "#ninthfloor" "#emacs")))
|
||||||
(setq erc-hide-list '("JOIN" "PART" "QUIT"))
|
(setq erc-hide-list '("JOIN" "PART" "QUIT"))
|
||||||
|
@ -259,13 +257,8 @@
|
||||||
(define-key key-translation-map (kbd "C-l") (kbd "C-j"))
|
(define-key key-translation-map (kbd "C-l") (kbd "C-j"))
|
||||||
|
|
||||||
(global-set-key (kbd "'") 'oni:self-insert-dwim)
|
(global-set-key (kbd "'") 'oni:self-insert-dwim)
|
||||||
(global-set-key (kbd "<XF86AudioNext>") 'emms-next)
|
|
||||||
(global-set-key (kbd "<XF86AudioPlay>") 'oni:emms-toggle-playing)
|
|
||||||
(global-set-key (kbd "<XF86AudioPrev>") 'emms-previous)
|
|
||||||
(global-set-key (kbd "<XF86AudioStop>") 'emms-stop)
|
|
||||||
(global-set-key (kbd "<XF86HomePage>") 'oni:raise-scratch)
|
(global-set-key (kbd "<XF86HomePage>") 'oni:raise-scratch)
|
||||||
(global-set-key (kbd "<XF86Mail>") 'oni:view-mail)
|
(global-set-key (kbd "<XF86Mail>") 'oni:view-mail)
|
||||||
(global-set-key (kbd "<XF86Tools>") 'oni:start-emms)
|
|
||||||
(global-set-key (kbd "<f10>") 'git-project-show-files)
|
(global-set-key (kbd "<f10>") 'git-project-show-files)
|
||||||
(global-set-key (kbd "<f5>") 'ext:reload-buffer)
|
(global-set-key (kbd "<f5>") 'ext:reload-buffer)
|
||||||
(global-set-key (kbd "<f6>") 'jabber-switch-to-roster-buffer)
|
(global-set-key (kbd "<f6>") 'jabber-switch-to-roster-buffer)
|
||||||
|
|
|
@ -83,6 +83,52 @@
|
||||||
(eval-after-load "eldoc" '(diminish 'eldoc-mode))
|
(eval-after-load "eldoc" '(diminish 'eldoc-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
Use the standard EMMS configuration and add some MPD settings.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
||||||
|
(defun oni:emms-init ()
|
||||||
|
"Initialization function for EMMS."
|
||||||
|
(require 'emms-setup)
|
||||||
|
(require 'emms-player-mpd)
|
||||||
|
|
||||||
|
(emms-standard)
|
||||||
|
|
||||||
|
(add-to-list 'emms-info-functions 'emms-info-mpd)
|
||||||
|
(add-to-list 'emms-player-list 'emms-player-mpd)
|
||||||
|
|
||||||
|
(setq emms-player-mpd-server-name "localhost")
|
||||||
|
(setq emms-player-mpd-server-port "6600")
|
||||||
|
(setq emms-player-mpd-music-directory "/mnt/music/mp3"))
|
||||||
|
|
||||||
|
(eval-after-load "emms-source-file" '(oni:emms-init))
|
||||||
|
(setq emms-source-file-default-directory "/mnt/music/")
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
Add some keybindings for EMMS.
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
||||||
|
(defun oni:emms-toggle-playing ()
|
||||||
|
"Toggle between playing/paused states."
|
||||||
|
(interactive)
|
||||||
|
(if (eq emms-player-playing-p nil)
|
||||||
|
(emms-start)
|
||||||
|
(emms-pause)))
|
||||||
|
|
||||||
|
(defun oni:start-emms ()
|
||||||
|
"Check to see if the function `emms' exists, if not call
|
||||||
|
`emms-player-mpd-connect' and assume that will have loaded it."
|
||||||
|
(interactive)
|
||||||
|
(unless (fboundp 'emms)
|
||||||
|
(emms-player-mpd-connect))
|
||||||
|
(emms))
|
||||||
|
|
||||||
|
(global-set-key (kbd "<XF86AudioNext>") 'emms-next)
|
||||||
|
(global-set-key (kbd "<XF86AudioPlay>") 'oni:emms-toggle-playing)
|
||||||
|
(global-set-key (kbd "<XF86AudioPrev>") 'emms-previous)
|
||||||
|
(global-set-key (kbd "<XF86AudioStop>") 'emms-stop)
|
||||||
|
(global-set-key (kbd "<XF86Tools>") 'oni:start-emms)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Eshell
|
** Eshell
|
||||||
|
|
||||||
Add ~unison~ to the list of =eshell-visual-commands= because it
|
Add ~unison~ to the list of =eshell-visual-commands= because it
|
||||||
|
|
|
@ -104,27 +104,6 @@ DOT are intentionally being skipped."
|
||||||
"Function for `emacs-lisp-mode-hook'."
|
"Function for `emacs-lisp-mode-hook'."
|
||||||
(eldoc-mode))
|
(eldoc-mode))
|
||||||
|
|
||||||
(defun oni:emms-init ()
|
|
||||||
"Initialization function for EMMS."
|
|
||||||
(require 'emms-setup)
|
|
||||||
(require 'emms-player-mpd)
|
|
||||||
|
|
||||||
(emms-standard)
|
|
||||||
|
|
||||||
(add-to-list 'emms-info-functions 'emms-info-mpd)
|
|
||||||
(add-to-list 'emms-player-list 'emms-player-mpd)
|
|
||||||
|
|
||||||
(setq emms-player-mpd-server-name "localhost")
|
|
||||||
(setq emms-player-mpd-server-port "6600")
|
|
||||||
(setq emms-player-mpd-music-directory "/mnt/music/mp3"))
|
|
||||||
|
|
||||||
(defun oni:emms-toggle-playing ()
|
|
||||||
"Toggle between playing/paused states."
|
|
||||||
(interactive)
|
|
||||||
(if (eq emms-player-playing-p nil)
|
|
||||||
(emms-start)
|
|
||||||
(emms-pause)))
|
|
||||||
|
|
||||||
(defun oni:erc-mode-func ()
|
(defun oni:erc-mode-func ()
|
||||||
"Function for `erc-mode-hook'."
|
"Function for `erc-mode-hook'."
|
||||||
(erc-fill-mode -1)
|
(erc-fill-mode -1)
|
||||||
|
@ -562,14 +541,6 @@ If no direction is given, don't split."
|
||||||
((?h) (split-window-horizontally))
|
((?h) (split-window-horizontally))
|
||||||
(t window))))
|
(t window))))
|
||||||
|
|
||||||
(defun oni:start-emms ()
|
|
||||||
"Check to see if the function `emms' exists, if not call
|
|
||||||
`emms-player-mpd-connect' and assume that will have loaded it."
|
|
||||||
(interactive)
|
|
||||||
(unless (fboundp 'emms)
|
|
||||||
(emms-player-mpd-connect))
|
|
||||||
(emms))
|
|
||||||
|
|
||||||
(defun oni:start-python-test-mail-server ()
|
(defun oni:start-python-test-mail-server ()
|
||||||
"Run the python test mailserver."
|
"Run the python test mailserver."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
Loading…
Reference in a new issue