adding some tweaks i guess

This commit is contained in:
Chris Cochrun 2023-03-21 10:43:10 -05:00
parent 458911f139
commit acd99a5c59
3 changed files with 95 additions and 13 deletions

37
init.el
View file

@ -108,9 +108,9 @@
:ensure t
:init
(doom-modeline-mode 1)
(setq doom-modeline-height 30
(setq doom-modeline-height 25
doom-modeline-bar-width 3
all-the-icons-scale-factor 1.0
all-the-icons-scale-factor 0.9
doom-modeline-hud nil
doom-modeline-buffer-file-name-style 'file-name
doom-modeline-buffer-encoding nil
@ -1394,6 +1394,7 @@ All my (performant) foldings needs are met between this and `org-show-subtree'
(add-hook 'imenu-after-jump-hook #'pulsar-recenter-top)
(add-hook 'imenu-after-jump-hook #'pulsar-reveal-entry))
(setq home-directory "~/")
(defun chris/eww-mpv ()
"Launch the url in mpv"
(interactive)
@ -1406,11 +1407,39 @@ All my (performant) foldings needs are met between this and `org-show-subtree'
(goto-char pt)
(let ((url (get-text-property (point) 'shr-url)))
(if (start-process "mpv" "mpv-output" "mpv" url)
(message (concat"mpv started => " url))
(message (concat "mpv started => " url))
(message "mpv failed, maybe this isn't a link?"))))))
;; (defun chris/)
(defun chris/eww-video-dl ()
"Download the video at the url"
(interactive)
(let ((pt (avy-with ace-link-eww
(avy-process
(mapcar #'cdr (ace-link--eww-collect))
(avy--style-fn avy-style)))))
(when (number-or-marker-p pt)
(goto-char pt)
(let ((url (get-text-property (point) 'shr-url)))
(if (start-process
"yt-dlp"
"yt-dlp-output"
"yt-dlp" "-o" (concat home-directory "Videos/%(title)s.%(ext)s") url)
(message (concat "downloading => " url))
(message "idk this failed I guess..."))
(pop-to-buffer "yt-dlp-output")
(comint-mode)
(evil-normal-state)
(general-def 'normal comint-mode-map
"q" 'kill-buffer-and-window)))))
(setq eww-search-prefix "https://search.tfcconnection.org/search?q=")
(general-def 'normal eww-mode-map
"gv" 'chris/eww-mpv)
"gv" 'chris/eww-mpv
"gV" 'chris/eww-video-dl)
(use-package vertico
:init