From 514705aac7c4bd2b022068d1a855eb9386f8e530 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 25 Dec 2022 19:36:24 -0800 Subject: [PATCH] New streamable backgrounds --- pape-opts/stream | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pape-opts/stream diff --git a/pape-opts/stream b/pape-opts/stream new file mode 100644 index 0000000..758cdcd --- /dev/null +++ b/pape-opts/stream @@ -0,0 +1,20 @@ +#!/bin/sh +# Here we do the same thing as the newbga however this time we provide a +# link which mpv can stream from + +link=`echo '' | dmenu -i -nb '#800080' -sb '#800080' -p 'URL: '` +if [ -z "$link" ]; then + echo No link given + exit 1 +fi + +pkill -9 xwinwrap + +mpv="mpv -wid WID --no-config --keepaspect=no --loop \ + --no-border --vd-lavc-fast --x11-bypass-compositor=no \ + --gapless-audio=yes --vo=x11 --hwdec=auto \ + --x11-name=mpvbg" + +# refer to newbga on what is going on here +xwinwrap -g 1920x1080+0 -ov -b -un -sh rectangle -fdt -ni -- \ + $mpv "$link" &