tweaks to empv and adding bluetooth?
This commit is contained in:
parent
47e16a9f60
commit
1992fca849
2 changed files with 82 additions and 6 deletions
37
init.el
37
init.el
|
@ -162,6 +162,11 @@
|
|||
|
||||
(setq proced-auto-update-flag t)
|
||||
|
||||
(use-package bluetooth
|
||||
:general
|
||||
(chris/leader-keys
|
||||
"oT" 'bluetooth-list-devices))
|
||||
|
||||
(use-package no-littering)
|
||||
|
||||
;; no-littering doesn't set this by default so we must place
|
||||
|
@ -2906,6 +2911,14 @@ targets."
|
|||
(interactive)
|
||||
(async-shell-command (concat "yt-dlp" " \"" (empv-youtube-results--current-video-url) "\"")))
|
||||
|
||||
(defun chris/empv-org-play-link (&optional link)
|
||||
"Play link in empv from either supplied link or link at point in org-mode"
|
||||
(interactive)
|
||||
(let ((link (if link
|
||||
link
|
||||
(org-babel-read-link))))
|
||||
(empv-play link)))
|
||||
|
||||
:general
|
||||
(chris/leader-keys
|
||||
:states 'normal
|
||||
|
@ -2914,7 +2927,10 @@ targets."
|
|||
"vt" 'empv-toggle
|
||||
"vv" 'empv-play-video
|
||||
"vx" 'empv-chapter-select
|
||||
"vy" 'empv-youtube-tabulated)
|
||||
"vy" 'empv-youtube-tabulated
|
||||
"vn" 'empv-playlist-next
|
||||
"vp" 'empv-playlist-prev
|
||||
"vs" 'empv-playlist-select)
|
||||
(general-def
|
||||
:states 'normal
|
||||
:keymaps 'empv-youtube-results-mode-map
|
||||
|
@ -2929,6 +2945,20 @@ targets."
|
|||
(defvar chris/elfeed-bongo-playlist "*Bongo-Elfeed Queue*"
|
||||
"Name of the Elfeed+Bongo multimedia playlist.")
|
||||
|
||||
(defun chris/elfeed-empv-play ()
|
||||
"Play elfeed video or podcast link in empv"
|
||||
(interactive)
|
||||
(let* ((entry (elfeed-search-selected :ignore-region))
|
||||
(link (elfeed-entry-link entry))
|
||||
(enclosure (elt (car (elfeed-entry-enclosures entry)) 0))
|
||||
(url (if (string-prefix-p "https://thumbnails" enclosure)
|
||||
link
|
||||
(if (string= enclosure nil)
|
||||
link
|
||||
enclosure)))
|
||||
(title (elfeed-entry-title entry)))
|
||||
(empv-play-or-enqueue url)))
|
||||
|
||||
(defun chris/elfeed-bongo-insert-item ()
|
||||
"Insert `elfeed' multimedia links in `bongo' playlist buffer.
|
||||
|
||||
|
@ -3011,7 +3041,8 @@ interfere with the default `bongo-playlist-buffer'."
|
|||
|
||||
(defun chris/elfeed-ui-setup ()
|
||||
(display-line-numbers-mode -1)
|
||||
(toggle-truncate-lines +1))
|
||||
(toggle-truncate-lines +1)
|
||||
(elfeed-search-fetch))
|
||||
|
||||
(defun chris/elfeed-show-ui-setup ()
|
||||
(display-line-numbers-mode -1)
|
||||
|
@ -3046,7 +3077,7 @@ interfere with the default `bongo-playlist-buffer'."
|
|||
"of" 'elfeed)
|
||||
|
||||
(general-def 'normal elfeed-search-mode-map
|
||||
"v" 'chris/elfeed-bongo-insert-item
|
||||
"v" 'chris/elfeed-empv-play
|
||||
"h" 'chris/elfeed-bongo-switch-to-playlist
|
||||
"b" 'chris/elfeed-eww-browse
|
||||
"o" 'chris/elfeed-org-view)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue