Index: Tomboy/PreferencesDialog.cs
===================================================================
--- Tomboy/PreferencesDialog.cs	(revision 1896)
+++ Tomboy/PreferencesDialog.cs	(working copy)
@@ -1112,7 +1112,7 @@
 		//       or something like that).
 		void NukeSyncClientManifest ()
 		{
-			// Nuke ~/.tomboy/manifest.xml
+			// Nuke $XDG_CONFIG_HOME/tomboy/manifest.xml
 			string clientManifestPath = System.IO.Path.Combine (
 			                                    Tomboy.DefaultNoteManager.NoteDirectoryPath,
 			                                    "manifest.xml");
Index: Tomboy/Tomboy.cs
===================================================================
--- Tomboy/Tomboy.cs	(revision 1896)
+++ Tomboy/Tomboy.cs	(working copy)
@@ -97,7 +97,7 @@
 			        override_path :
 			        Environment.GetEnvironmentVariable ("TOMBOY_PATH");
 			if (note_path == null)
-				note_path = "~/.tomboy";
+				note_path = Preferences.Get(Preferences.CONFIG_DIRECTORY) as string;
 
 			// Tilde expand
 			return note_path.Replace ("~", Environment.GetEnvironmentVariable ("HOME"));
Index: Tomboy/Addins/Bugzilla/BugzillaLink.cs
===================================================================
--- Tomboy/Addins/Bugzilla/BugzillaLink.cs	(revision 1896)
+++ Tomboy/Addins/Bugzilla/BugzillaLink.cs	(working copy)
@@ -1,5 +1,6 @@
 using System;
 using Tomboy;
+using System.IO;
 
 namespace Tomboy.Bugzilla
 {
@@ -45,7 +46,8 @@
 
 			string host = uri.Host;
 			// TODO: Get this in a safer way
-			string imageDir = "~/.tomboy/BugzillaIcons/";
+			string imageDir = Path.Combine(Preferences.Get(Preferences.CONFIG_DIRECTORY) as string,
+			                               "BugzillaIcons/");
 			string imagePath = imageDir.Replace ("~", Environment.GetEnvironmentVariable ("HOME")) + host + ".png";
 
 			try {
Index: Tomboy/NoteManager.cs
===================================================================
--- Tomboy/NoteManager.cs	(revision 1896)
+++ Tomboy/NoteManager.cs	(working copy)
@@ -54,8 +54,25 @@
 			notes = new List<Note> ();
 
 			bool first_run = FirstRun ();
-			CreateNotesDir ();
+			string old_config_dir = Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".tomboy/");
+			
+			if (first_run && Directory.Exists(old_config_dir))
+			{
+				CreateNotesDir();
+				string[] old_files = GetAllFilesInDirectory(old_config_dir);
 
+				foreach(string file in old_files)
+				{
+					string new_file = Path.Combine(notes_dir, Path.GetFileName(file));
+					File.Move(file, new_file);
+				}
+				Directory.Delete(old_config_dir, true);
+				first_run = false;
+				
+			}
+			else
+				CreateNotesDir ();
+
 			trie_controller = CreateTrieController ();
 			addin_mgr = CreateAddinManager ();
 
@@ -68,8 +85,17 @@
 
 			Tomboy.ExitingEvent += OnExitingEvent;
 		}
+		private string[] GetAllFilesInDirectory(string path)
+		{
+			List<string> files = new List<string>();
+			files.AddRange(Directory.GetFiles(path));
+			foreach(string dir in Directory.GetDirectories(path))
+			{
+				files.AddRange(GetAllFilesInDirectory(dir));
+			}
+			return files.ToArray();
+		}
 		
-		
 		// Create the TrieController. For overriding in test methods.
 		protected virtual TrieController CreateTrieController ()
 		{
@@ -78,11 +104,7 @@
 
 		protected virtual AddinManager CreateAddinManager ()
 		{
-			string tomboy_conf_dir =
-			        Path.Combine (Environment.GetEnvironmentVariable ("HOME"),
-			                      ".tomboy");
-
-			return new AddinManager (tomboy_conf_dir);
+			return new AddinManager (Preferences.Get(Preferences.CONFIG_DIRECTORY) as string);
 		}
 
 		// For overriding in test methods.
@@ -285,7 +307,6 @@
 
 			notes.Remove (note);
 			note.Delete ();
-
 			Logger.Log ("Deleting note '{0}'.", note.Title);
 
 			if (NoteDeleted != null)
Index: Tomboy/Preferences.cs
===================================================================
--- Tomboy/Preferences.cs	(revision 1896)
+++ Tomboy/Preferences.cs	(working copy)
@@ -1,12 +1,14 @@
 
 using System;
-
+using System.IO;
 using Mono.Unix;
 
 namespace Tomboy
 {
 	public class Preferences
 	{
+		public const string CONFIG_DIRECTORY = "/apps/tomboy/config_directory";
+		
 		public const string ENABLE_SPELLCHECKING = "/apps/tomboy/enable_spellchecking";
 		public const string ENABLE_WIKIWORDS = "/apps/tomboy/enable_wikiwords";
 		public const string ENABLE_CUSTOM_FONT = "/apps/tomboy/enable_custom_font";
@@ -66,6 +68,13 @@
 		public static object GetDefault (string key)
 		{
 			switch (key) {
+			case CONFIG_DIRECTORY:
+				if (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("XDG_CONFIG_HOME")))
+					return Path.Combine(Environment.GetEnvironmentVariable("XDG_CONFIG_HOME"),
+					                    "tomboy");
+				else
+					return Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".config/tomboy");
+				break;
 			case ENABLE_SPELLCHECKING:
 			case ENABLE_KEYBINDINGS:
 				return true;
