Skip to content

Instantly share code, notes, and snippets.

@lytithwyn
Created February 26, 2011 15:54
Show Gist options
  • Save lytithwyn/845325 to your computer and use it in GitHub Desktop.
Save lytithwyn/845325 to your computer and use it in GitHub Desktop.
A script that will randomize the signature file in my Thunderbird email account
#!/usr/bin/env ruby
require "fileutils"
#this is the file that we will write the chosen sig to
tbirdSigFile = "/home/lytithwyn/.thunderbird/r2hddzc6.default/sigs/lytithwyn@gmail.htm"
Dir.chdir(Dir.home() + "/sigs") do
sigs = Dir.glob("*.htm");
sigFileNumberToUse = rand(sigs.length);
FileUtils.cp sigs[sigFileNumberToUse], tbirdSigFile
end
@lytithwyn
Copy link
Author

I found it really dumb that there wasn't a simple way to randomize the sig in Thunderbird. There was an add-on that was supposed to do this, but lots of people were complaining about it so I didn't even try it. I have this script running in my ~/.flubox/startup file, so I get a random sig every time I sign on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment