1 diff -ur a/src/history.cc src/history.cc
2 --- a/src/history.cc 2002-08-17 15:19:31.000000000 +0200
3 +++ a/src/history.cc 2012-06-04 23:42:35.314653414 +0200
5 HistoryFile::HistoryFile()
8 - m_filename = g_get_home_dir();
9 - m_filename += "/.gmrun_history";
10 + const char* filename = getenv("XDG_CACHE_HOME");
11 + if (filename != 0 && *filename != '\0') {
12 + m_filename = filename;
13 + m_filename += "/gmrun_history";
16 + m_filename = g_get_home_dir();
17 + m_filename += "/.gmrun_history";
20 m_default_set = false;
22 diff -ur a/src/prefs.cc src/prefs.cc
23 --- a/src/prefs.cc 2012-06-04 22:35:00.671949439 +0200
24 +++ a/src/prefs.cc 2012-06-04 23:24:24.184445962 +0200
29 - file_name = getenv("HOME");
30 - if (!file_name.empty()) {
32 + const char* filename = getenv("XDG_CONFIG_HOME");
33 + if (filename != 0 && *filename != '\0') {
34 + file_name = filename;
35 string::iterator i = file_name.end() - 1;
36 - if (*i == '/') file_name.erase(i);
44 + filename = getenv("HOME");
45 + if (filename != 0 && *filename != '\0') {
46 + file_name = filename;
47 + string::iterator i = file_name.end() - 1;
52 + file_name += GMRUNRC;
55 + if (!file_name.empty()) {