mirror of
https://github.com/pigmonkey/spark.git
synced 2026-08-04 21:44:06 +00:00
add play script for mpv + youtube-dl integration
I recommend binding play to a key via sxhkd. Enjoy streaming video from anywhere, without allowing all the javascripts in your browser.
This commit is contained in:
parent
5db68aed28
commit
c29f7c22df
3 changed files with 23 additions and 0 deletions
|
|
@ -78,6 +78,7 @@ browser_choices:
|
|||
- firefox -P work
|
||||
- firewarden chromium
|
||||
- tor-browser-en
|
||||
- play
|
||||
- qcode
|
||||
|
||||
passwordless_sudo:
|
||||
|
|
|
|||
19
roles/mpv/files/play.sh
Executable file
19
roles/mpv/files/play.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Take advantage of mpv's youtube-dl integration to easily watch videos outside
|
||||
# of the browser. Use sxhkd or xbindkeys to bind this script to a key. When
|
||||
# you're on a YouTube page, copy the URL to your clipboardand and hit your key
|
||||
# binding; the video will automatically begin streaming via mpv.
|
||||
###############################################################################
|
||||
|
||||
read -t 0 stdin
|
||||
|
||||
if [ -n "$stdin" ]; then
|
||||
source="$stdin"
|
||||
elif [ -n "$1" ]; then
|
||||
source="$1"
|
||||
else
|
||||
source=$(xclip -o -selection clipboard)
|
||||
fi
|
||||
|
||||
eval mpv "$source"
|
||||
|
|
@ -15,3 +15,6 @@
|
|||
- activate firejail profiles
|
||||
tags:
|
||||
- firejail
|
||||
|
||||
- name: Push play script
|
||||
copy: src=play.sh dest=/usr/local/bin/play mode=0755
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue