diff options
Diffstat (limited to '.emacs.d/modules/thanos-multimedia.el')
-rw-r--r-- | .emacs.d/modules/thanos-multimedia.el | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/.emacs.d/modules/thanos-multimedia.el b/.emacs.d/modules/thanos-multimedia.el index 7d556d0..69df8df 100644 --- a/.emacs.d/modules/thanos-multimedia.el +++ b/.emacs.d/modules/thanos-multimedia.el @@ -30,17 +30,21 @@ ;;; Code: ;; EMMS -(require 'emms) -(emms-all) -(setf emms-player-list '(emms-player-mpv) - emms-player-mpv-parameters '("--no-video") - emms-info-functions '(emms-info-native) - emms-playlist-buffer-name "*Music*" - emms-source-file-default-directory "~/Music") + +(use-package emms + :straight t + :bind + ("A" . 'emms-add-directory) + :config + (setf emms-player-list '(emms-player-mpv) + emms-player-mpv-parameters '("--no-video") + emms-info-functions '(emms-info-native) + emms-playlist-buffer-name "*Music*" + emms-source-file-default-directory "~/Music")) + (define-key 'thanos/applications-map (kbd "e") 'emms) -(define-key emms-playlist-mode-map (kbd "A") 'emms-add-directory) ;; yeetube (defun yeetube-download-vimeo-videos () @@ -92,7 +96,8 @@ prompt blank to keep the default name." (add-to-list 'load-path "~/Developer/emacs-lisp/yeetube") (load-file "~/Developer/emacs-lisp/yeetube/yeetube.el")) -(require 'yeetube) + +(straight-use-package '(yeetube :type git :host nil :repo "https://git.thanosapollo.com/yeetube")) (setf yeetube-results-limit 20 yeetube-mpv-disable-video t) @@ -111,19 +116,18 @@ prompt blank to keep the default name." (format "%s \"%s\"" media-player (replace-regexp-in-string "\\byewtu\\.be\b" "youtube.com" url))))))) -(define-prefix-command 'thanos/yeetube) -(global-set-key (kbd "C-c y") 'thanos/yeetube) -(define-key thanos/yeetube (kbd "s") 'yeetube-search) -(define-key thanos/yeetube (kbd "b") 'yeetube-play-saved-video) -(define-key thanos/yeetube (kbd "d") 'yeetube-download-videos) -(define-key thanos/yeetube (kbd "p") 'yeetube-mpv-toggle-pause) -(define-key thanos/yeetube (kbd "v") 'yeetube-mpv-toggle-no-video-flag) -(define-key thanos/yeetube (kbd "C-p") 'yeetube-mpv-toggle-video) -(define-key thanos/yeetube (kbd "k") 'yeetube-remove-saved-video) -(define-key thanos/yeetube (kbd "u") 'yeetube-change-platform) -(define-key thanos/yeetube (kbd "C-d") 'yeetube-download-vimeo-videos) - -(define-key yeetube-mode-map (kbd "c") 'yeetube-switch-mpv) +(defvar-keymap thanos/yeetube-map + :doc "Personal yeetube map." + "s" #'yeetube-search + "b" #'yeetube-play-saved-video + "d" #'yeetube-download-videos + "C-d" #'yeetube-download-vimeo-videos + "p" #'yeetube-mpv-toggle-pause + "v" #'yeetube-mpv-toggle-no-video-flag + "C-p" #'yeetube-mpv-toggle-video + "k" #'yeetube-remove-saved-video) + +(global-set-key (kbd "C-c y") thanos/yeetube-map) |