                     (action . (lambda (url)
                                 (browse-url url)))))))
 
-;;  From http://oremacs.com/2015/01/05/youtube-dl
 (defun ar/youtube-download ()
   "Download youtube video from url in clipboard."
   (interactive)
-  (let* ((url (current-kill 0))
-         (default-directory "~/Downloads")
-         (proc (get-buffer-process (ansi-term "/bin/bash"))))
-    (term-send-string
-     proc
-     (concat "cd ~/Downloads && youtube-dl " url "\n"))))
+  (ar/youtube-async-download (current-kill 0)))
 
 (defun ar/view-clipboard-buffer ()
   "View clipboard buffer."

(use-package maxframe :ensure t)
(add-hook 'window-setup-hook 'maximize-frame t)

(use-package elfeed :ensure t
  :config
  (validate-setq elfeed-feeds
                 '(("https://matt.hackinghistory.ca/feed/" blog emacs MattPrice)
                   ("http://www.brool.com/index.xml" blog emacs Brool)
                   ("https://elephly.net/feed.xml" blog emacs Elephly)
                   ("https://hasanyavuz.ozderya.net/?feed=rss2" blog emacs HasanYavuz)

(require 'use-package)

(use-package validate :ensure t)

;; flet is no longer available. Use noflet as a replacement.
(use-package noflet :ensure t)

(use-package async :ensure t :demand
  :config
