index all rss twitter github linkedin email
Álvaro Ramírez

Álvaro Ramírez

01 August 2022 dwim-shell-command video streams

I continue hunting for use-cases I can migrate to dwim-shell-command… After adding clipboard support (via ) I found one more.

  1. Copy URL from browser.
  2. Invoke dwim-shell-commands-mpv-stream-clipboard-url.
  3. Enjoy picture in picture from Emacs ;)


What's the secret sauce? Very little. Invoke the awesome mpv with a wrapping function using dwim-shell-command-on-marked-files.

(defun dwim-shell-commands-mpv-stream-clipboard-url ()
  "Stream clipboard URL using mpv."
   "mpv --geometry=30%x30%+100%+0% \"<<cb>>\""
   :utils "mpv"
   :no-progress t
   :error-autofocus t
   :silent-success t))

The typical progress bar kinda got in the way, so I added a new option :no-progress to dwim-shell-command-on-marked-files, so it can be used for cases like this one.