diff -up surf-0.3/config.def.h surf-0.3-modified/config.def.h --- surf-0.3/config.def.h 2009-10-30 08:41:02.000000000 -0400 +++ surf-0.3-modified/config.def.h 2009-12-03 16:09:51.000000000 -0500 @@ -5,6 +5,7 @@ static char *progress_trust = "#00FF00"; static char *stylefile = ".surf/style.css"; static char *scriptfile = ".surf/script.js"; static char *cookiefile = ".surf/cookies.txt"; +static char *historyfile = ".surf/history.txt"; static char *dldir = ".surf/dl"; static time_t sessiontime = 3600; diff -up surf-0.3/surf.c surf-0.3-modified/surf.c --- surf-0.3/surf.c 2009-10-30 08:41:02.000000000 -0400 +++ surf-0.3-modified/surf.c 2009-12-03 16:08:20.000000000 -0500 @@ -166,6 +166,7 @@ cleanup(void) { while(clients) destroyclient(clients); g_free(cookiefile); + g_free(historyfile); g_free(dldir); g_free(scriptfile); g_free(stylefile); @@ -439,6 +440,12 @@ loaduri(Client *c, const Arg *arg) { u = g_strrstr(uri, "://") ? g_strdup(uri) : g_strdup_printf("http://%s", uri); webkit_web_view_load_uri(c->view, u); + + FILE *f; + f = fopen(historyfile, "a+"); + fprintf(f, "%s\n", u); + fclose(f); + c->progress = 0; c->title = copystr(&c->title, u); g_free(u); @@ -695,6 +702,7 @@ setup(void) { /* create dirs and files */ cookiefile = buildpath(cookiefile); + historyfile = buildpath(historyfile); dldir = buildpath(dldir); scriptfile = buildpath(scriptfile); stylefile = buildpath(stylefile);