aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/init/ycp-emms.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/init/ycp-emms.el')
-rw-r--r--.emacs.d/init/ycp-emms.el99
1 files changed, 0 insertions, 99 deletions
diff --git a/.emacs.d/init/ycp-emms.el b/.emacs.d/init/ycp-emms.el
deleted file mode 100644
index d83b53b..0000000
--- a/.emacs.d/init/ycp-emms.el
+++ /dev/null
@@ -1,99 +0,0 @@
-;;; ycp-emms.el -- My configs for multimedia -*- lexical-binding: t -*-
-
-;; Copyright (C) 2023 Free Software Foundation.
-
-;; Author: Yuchen Pei <id@ypei.org>
-;; Package-Requires: ((emacs "28.2"))
-
-;; This file is part of dotfiles.
-
-;; dotfiles is free software: you can redistribute it and/or modify it under
-;; the terms of the GNU Affero General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; dotfiles is distributed in the hope that it will be useful, but WITHOUT
-;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
-;; Public License for more details.
-
-;; You should have received a copy of the GNU Affero General Public
-;; License along with dotfiles. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; My configs for multimedia.
-
-;;; Code:
-
-;;; emms is only loaded when `my-profile' is emms, see early-init.el
-(my-package emms
- (:install t)
- (require 'emms-setup)
- ;; FIXME: only enable what i use
- (emms-all)
- (setq emms-playing-time-resume-from-last-played t)
- (add-to-list 'emms-info-functions 'emms-info-ytdl)
- ;; emms-info-native is not very useful
- (delete 'emms-info-native emms-info-functions)
- (setq emms-source-file-default-directory (locate-user-emacs-file "emms"))
- (setq emms-source-playlist-default-format 'native)
- (setq emms-repeat-playlist t)
- (my-keybind emms-playlist-mode-map "C-x C-f" #'emms-play-playlist)
- (setq emms-player-list '(emms-player-mpv))
- (setq emms-player-vlc-parameters '("--intf=qt" "--extraintf=rc"))
- (setq emms-playlist-buffer-name "*EMMS Playlist*")
- (setq emms-source-file-directory-tree-function
- 'emms-source-file-directory-tree-find)
- (setq emms-info-ytdl-using-torsocks t)
- (add-hook 'emms-playlist-mode-hook #'hl-line-mode)
- (add-hook 'emms-metaplaylist-mode-hook #'hl-line-mode)
- )
-
-(my-package my-emms
- (my-setq-from-local my-emms-playlist-alist)
- (my-keybind global-map
- "C-c s t" #'my-emms-mpv-toggle-torsocks
- "C-c s SPC" #'my-emms-switch-to-playlist-buffer
- "C-c s v" #'my-emms-mpv-toggle-video
- "<XF86AudioPause>" #'emms-pause
- "<XF86AudioPlay>" #'emms-pause
- "<XF86AudioNext>" #'emms-next
- "<XF86AudioPrev>" #'emms-seek-backward
- "C-c s a" #'emms-add-all
- "C-c s s" #'emms
- "C-c s S" #'my-emms-save-all
- "C-c s e" #'emms-metaplaylist-mode-go
- "C-c s m" #'emms-mode-line-toggle
- "C-c s n" #'emms-next
- "C-c s r" #'emms-random
- "C-c s p" #'my-emms-print-current-track-display-name
- "C-c s f" #'my-emms-append-current-track-to-favourites
- "C-c s F" #'emms-append-current-track-name-to-file
- "C-c s P" #'emms-pause
- "C-c s u" #'emms-add-url
- "C-c s o" #'my-emms-add-url-region
- "C-c s y" #'my-emms-add-ytdl-playlist
- "C-c s w" #'my-emms-kill-current-track-name
- )
- (my-keybind emms-playlist-mode-map
- "s" #'my-emms-playlist-save-current-buffer
- "C-<return>" #'my-emms-playlist-mode-make-current
- "w" #'my-emms-playlist-kill-track-name-at-point
- "D" #'my-emms-playlist-delete-at-point
- "R" #'my-emms-random-album
- "N" #'my-emms-next-track-or-random-album
- )
- (add-hook 'emms-player-started-hook 'my-emms-maybe-seek-to-last-played)
- (my-override emms-mode-line-enable)
- (my-override emms-mode-line-disable)
- (my-override emms-mode-line-toggle)
- (add-hook 'emms-playlist-selection-changed-hook
- 'my-emms-output-current-track-to-i3bar-file)
- (setq emms-player-next-function 'my-emms-next-track-or-random-album)
- (my-keybind dired-mode-map "e" #'my-dired-add-to-emms)
- (my-override emms-track-simple-description)
- (my-emms-add-all)
- )
-
-(provide 'ycp-emms)