diff options
author | Thanos Apollo <[email protected]> | 2023-09-22 21:38:49 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-09-22 21:38:49 +0300 |
commit | fc9e9dd24d05bf71a0afc8bef16e359d4cd49c83 (patch) | |
tree | f6d2b47eafdec17fd2b3d97e7d9c9b4bc4f34b20 /.emacs.d/modules | |
parent | 4472780508e2de169fe93282ce1e63ae56721f2f (diff) |
multimedia.el: Update paths and keybindings
Diffstat (limited to '.emacs.d/modules')
-rw-r--r-- | .emacs.d/modules/thanos-multimedia.el | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/.emacs.d/modules/thanos-multimedia.el b/.emacs.d/modules/thanos-multimedia.el index 232b33f..b81ac40 100644 --- a/.emacs.d/modules/thanos-multimedia.el +++ b/.emacs.d/modules/thanos-multimedia.el @@ -36,8 +36,10 @@ emms-player-mpv-parameters '("--no-video") emms-info-functions '(emms-info-native) emms-playlist-buffer-name "*Music*" - emms-source-file-default-directory "~/Music/jazz") + 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-tree) ;; yeetube @@ -87,18 +89,33 @@ prompt blank to keep the default name." url name)))))) (when is-zeus - (load-file "~/Developer/yeetube.el/yeetube.el")) + (load-file "~/Developer/emacs-lisp/yeetube.el/yeetube.el")) (require 'yeetube) (setf yeetube-results-limit 30 yeetube-mpv-disable-video t) +(defun yeetube-play-url (url) + "Open URL using yeetube-player." + (interactive "sURL:") + (let ((media-player (executable-find (symbol-name yeetube-player)))) + (unless media-player + (error (format "%s not found." media-player))) + (when (string-prefix-p "http" url) + (setf yeetube-last-played url) + (if (eq yeetube-player 'mpv) + (yeetube-start-mpv-process url) + (yeetube-start-process + (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) |