diff options
author | Case Duckworth | 2021-09-27 23:08:20 -0500 |
---|---|---|
committer | Case Duckworth | 2021-09-27 23:08:20 -0500 |
commit | bc902ff38e16ac861e3c4937439f041921fec31f (patch) | |
tree | 88373bb2511ff4ad6bd77b08f226540f998db05d | |
parent | Remove unused packages (diff) | |
download | emacs-bc902ff38e16ac861e3c4937439f041921fec31f.tar.gz emacs-bc902ff38e16ac861e3c4937439f041921fec31f.zip |
Add ytel
-rw-r--r-- | init.el | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/init.el b/init.el index 3948557..0e0be3c 100644 --- a/init.el +++ b/init.el | |||
@@ -2373,6 +2373,22 @@ If used with a numeric prefix argument N, N backticks will be inserted." | |||
2373 | 2373 | ||
2374 | (setup (:straight xr)) | 2374 | (setup (:straight xr)) |
2375 | 2375 | ||
2376 | (setup (:straight-if ytel | ||
2377 | (executable-find "mpv")) | ||
2378 | ;; This might need to be changed depending on whether the instance goes down. | ||
2379 | (:option ytel-invidious-api-url "https://invidious.snopyta.org") | ||
2380 | (:bind "y" | ||
2381 | (defun ytel-watch () ; This could possibly use `browse-url'. | ||
2382 | "Stream video at point in mpv." | ||
2383 | (interactive) | ||
2384 | (let* ((video (ytel-get-current-video)) | ||
2385 | (id (ytel-video-id video))) | ||
2386 | (start-process "ytel mpv" nil | ||
2387 | "mpv" | ||
2388 | (concat "https://www.youtube.com/watch?v=" id) | ||
2389 | "--ytdl-format=bestvideo[height<=?720]+bestaudio/best") | ||
2390 | (message "Starting streaming..."))))) | ||
2391 | |||
2376 | (setup (:straight zzz-to-char) | 2392 | (setup (:straight zzz-to-char) |
2377 | 2393 | ||
2378 | (:global "M-z" | 2394 | (:global "M-z" |