diff --git a/config.def.h b/config.def.h
index 39bc17b..0991643 100644
--- a/config.def.h
+++ b/config.def.h
@@ -11,6 +11,10 @@ static const float TRANSPARENCY = 0.4;
static const char FORMAT_COMMAND[] = "%s";
static const char FORMAT_DESCRIPTION[] = "%s";
+/* directories and files */
+static const char ZATHURA_DIR[] = ".zathura";
+static const char BOOKMARK_FILE[] = "bookmarks";
+
/* look */
static const char font[] = "monospace normal 9";
static const char default_bgcolor[] = "#000000";
diff --git a/zathura.c b/zathura.c
index 1c4536a..42fb5ea 100644
--- a/zathura.c
+++ b/zathura.c
@@ -224,6 +224,7 @@ struct
} Zathura;
/* function declarations */
+void init_directories();
void init_zathura();
void add_marker(int);
void build_index(GtkTreeModel*, GtkTreeIter*, PopplerIndexIter*);
@@ -303,6 +304,14 @@ gboolean cb_inputbar_activate(GtkEntry*, gpointer);
#include "config.h"
/* function implementation */
+void
+init_directories()
+{
+ gchar *base_directory = g_build_filename(g_get_home_dir(), ZATHURA_DIR, NULL);
+ g_mkdir_with_parents(base_directory, 0771);
+ g_free(base_directory);
+}
+
void
init_zathura()
{
@@ -2491,6 +2500,8 @@ int main(int argc, char* argv[])
gtk_init(&argc, &argv);
init_zathura();
+ init_directories();
+
update_status();
if(argc >= 2)