Skip to content

Instantly share code, notes, and snippets.

@nemanjan00
Created June 6, 2018 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nemanjan00/22d53dc5206117a5fe54a32cc8f39bd4 to your computer and use it in GitHub Desktop.
Save nemanjan00/22d53dc5206117a5fe54a32cc8f39bd4 to your computer and use it in GitHub Desktop.
Video wallpaper
#!/bin/bash
# credits: https://www.reddit.com/r/unixporn/comments/8p2u34/animated_backgrounds/e08a650/
_screen() {
xwinwrap -ov -g $1 -- mpv --fullscreen\
--on-all-workspaces \
--no-stop-screensaver \
--loop-file --no-audio --no-osc --no-osd-bar -wid WID --quiet \
"$2" --background="$3" --video-zoom="$4" &
}
killall xwinwrap
sleep 0.5
for i in $( xrandr -q | grep ' connected' | grep -oP '\d+x\d+\+\d+\+\d+')
do
_screen $i "$1" "${2:-#000000}" "${3:-0}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment