about summary refs log tree commit diff stats
path: root/preferences.c
diff options
context:
space:
mode:
Diffstat (limited to 'preferences.c')
-rw-r--r--preferences.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/preferences.c b/preferences.c
index f5e5284a..96ba7b8e 100644
--- a/preferences.c
+++ b/preferences.c
@@ -20,15 +20,18 @@
  *
  */
 
+#include <stdlib.h>
 #include <glib.h>
 
 #include "windows.h"
 
 void prefs_load(void)
 {
-    GKeyFile *g_prefs = g_key_file_new();
+    GString *prefs_loc = g_string_new(getenv("HOME"));
+    g_string_append(prefs_loc, "/.profanity");
 
-    g_key_file_load_from_file(g_prefs, "/home/james/.profanity",
+    GKeyFile *g_prefs = g_key_file_new();
+    g_key_file_load_from_file(g_prefs, prefs_loc->str,
         G_KEY_FILE_NONE, NULL);
 
     gboolean beep = g_key_file_get_boolean(g_prefs, "settings", "beep", NULL);