Created
April 20, 2014 00:05
-
-
Save creature/11101265 to your computer and use it in GitHub Desktop.
A script that generates an XML file suitable for use by the Gnome Background Properties to change wallpapers.
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
files = [] | |
puts "<background> | |
<starttime> | |
<year>2009</year> | |
<month>08</month> | |
<day>04</day> | |
<hour>00</hour> | |
<minute>00</minute> | |
<second>00</second> | |
</starttime>" | |
puts " <static> | |
<duration>1795.0</duration> | |
<file>#{ARGV[1]}</file> | |
</static>" | |
ARGV[2..-1].each_with_index do |filename, i| | |
puts " <transition> | |
<duration>5.0</duration> | |
<from>#{ARGV[i-1]}</from> | |
<to>#{filename}</to> | |
</transition> | |
<static> | |
<duration>1795.0</duration> | |
<file>#{filename}</file> | |
</static>" | |
end | |
puts " <transition> | |
<duration>5.0</duration> | |
<from>#{ARGV[-1]}</from> | |
<to>#{ARGV[1]}</to> | |
</transition> | |
</background>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment