From 019cf849ba449e7c069c376b17064f1099e8b6a1 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 3 Apr 2022 22:22:29 -0700 Subject: [PATCH] * Fixing broken music background script --- musicbg | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/musicbg b/musicbg index 5992ca4..419b230 100755 --- a/musicbg +++ b/musicbg @@ -4,12 +4,18 @@ kill -9 `pgrep xwinwrap | head -1` # pick out the music video we want to play in the background -base="$HOME/Videos/Music/" -pape=`ls "${HOME}/Videos/Music/" | shuf | head -n 1` +pape_name=`ls "${HOME}/Videos/Papes/" | dmenu -i -l 10 -p 'Pick a papes :^)'` -mpv="mpv --wid WID --no-config --keepaspect=no --loop \ +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" -xwinwrap -g 1920x1080 -ni -fdt -sh rectangle -un -b -nf -ov -- $mpv "$base/$pape" & > /dev/null 2>&1 & + +# The magic here happens with xwinwrap the flags given to mpv don't really matter +# unless you have an mpv config the flags below are pretty much the only flags you +# need to get this working +xwinwrap -g 1920x1080+0 -ov -b -un -sh rectangle -fdt -ni -- \ + $mpv "$HOME/Videos/Papes/$pape_name" & + +# welcome to the rice fields