.emacs.d

my emacs configuration directory
Log | Files | Refs | README

music.el (1452B)


      1 ;; -*- lexical-binding: t; -*-
      2 ;;; Music-related configuration.
      3 
      4 (use-package ready-player :ensure t
      5   :init (ready-player-mode)
      6   (defun now-playing ()
      7     (let ((out (ignore-errors
      8                  (with-current-buffer (ready-player--active-buffer)
      9                    (let ((title (ready-player--row-value
     10                             (ready-player--make-metadata-rows ready-player--metadata)
     11                             "Title:"))
     12                          (artist (ready-player--row-value
     13                             (ready-player--make-metadata-rows ready-player--metadata)
     14                             "Artist:")))
     15                      (cond ((and title artist) (format "%s - %s" title artist))
     16                            (title title)
     17                            (t "")))))))
     18       (if out out "")))
     19 
     20   :config
     21   (setq ready-player-ask-for-project-sustainability nil)
     22   (setq ready-player-my-media-collection-location (expand-file-name "~/soul"))
     23 
     24   :bind
     25   (("s-<left>" . ready-player-seek-backward)
     26    ("s-<right>" . ready-player-seek-forward)
     27    ("C-c m n" . ready-player-next)
     28    ("C-c m p" . ready-player-previous)
     29    ("C-c m SPC" . ready-player-toggle-play-stop)
     30    ("C-c m /" . ready-player-search)
     31    ("C-c m i" . ready-player-show-info)
     32    ("<XF86AudioNext>" . ready-player-next)
     33    ("<XF86AudioPrev>" . ready-player-previous)
     34    ("<XF86AudioPlay>" . ready-player-toggle-play-stop)
     35    ("<XF86AudioPause>" . ready-player-toggle-play-stop)))