8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free# Written by Tavmjong Bah
8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free self.OptionParser.add_option("-s", "--size", action="store", type="string", dest="desktop_size", default="16", help="Desktop size")
8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free self.OptionParser.add_option("-w", "--width", action="store", type="int", dest="desktop_width", default="1920", help="Custom width")
8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free self.OptionParser.add_option("-z", "--height", action="store", type="int", dest="desktop_height", default="1080", help="Custom height")
8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free root.set("viewBox", "0 0 " + str(width) + " " + str(height) )
8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free namedview = root.find(inkex.addNS('namedview', 'sodipodi'))
8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free namedview = inkex.etree.SubElement( root, inkex.addNS('namedview', 'sodipodi') );
8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free namedview.set(inkex.addNS('document-units', 'inkscape'), 'px')
8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free namedview.set(inkex.addNS('cx', 'inkscape'), str(width/2.0) )
8ac705ee842a9087042c9ed7d126f39cadac9cectavmjong-free namedview.set(inkex.addNS('cy', 'inkscape'), str(height/2.0) )