Skip to content

Instantly share code, notes, and snippets.

@Visgean
Created April 16, 2014 10:16
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 Visgean/10847362 to your computer and use it in GitHub Desktop.
Save Visgean/10847362 to your computer and use it in GitHub Desktop.
gsettings set org.gnome.desktop.background picture-uri file:///home/visgean/.trianglify_background.svg
#!/usr/bin/env node
var fs = require('fs');
var Trianglify = require('trianglify');
var t = new Trianglify();
var image_data = t.generate(1920, 1080).svgString;
// now we need to lowercase PATH and SVG tags
image_data = image_data.split('PATH').join('path')
image_data = image_data.split('SVG').join('svg')
fs.writeFile('/home/<username>/.trianglify_background.svg', image_data, function(err) {
if(err) {
console.log(err);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment