Created
October 14, 2018 23:06
-
-
Save noerw/a8c85a8a04805c2b54d50280d0e80387 to your computer and use it in GitHub Desktop.
convert GLSL shader to gnome wallpaper slideshow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
shader=$1 # first argument is path to shader | |
renderstart=0 # seconds | |
renderend=20 | |
resolutionx=1920 | |
resolutiony=1080 | |
wallduration=20 # seconds, minimum 1 | |
target_dir=`basename $shader`_wallpaper | |
rm -r $target_dir | |
mkdir $target_dir | |
cd $target_dir | |
# build & install from https://github.com/patriciogonzalezvivo/glslViewer | |
glslViewer $shader --headless -w $resolutionx -h $resolutiony -e sequence,$renderstart,$renderend -e q | |
# build & install from https://github.com/almet/gnome-background-generator | |
gnome-background-generator -d $wallduration -t 0 ./ | |
# set the new background, forcing a config change | |
dconf write /org/gnome/desktop/background/picture-uri "'/dev/null'" | |
dconf write /org/gnome/desktop/background/picture-uri "'file://`pwd`/dynamic-wallpaper.xml'" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment