sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 263d6a63f59fb9883c6e491f4216321ace1f0250
parent 9774abd9a692273e07ddfa6c5f6a4c3d1c49953c
Author: Samuel Baldwin <recursive.forest@gmail.com>
Date:   Thu,  3 Dec 2009 16:16:58 -0500

Added version 0.3 of history patch to surf patches.
Diffstat:
Msurf.suckless.org/patches/history.md | 4+++-
Asurf.suckless.org/patches/surf-0.3-history.diff | 43+++++++++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/surf.suckless.org/patches/history.md b/surf.suckless.org/patches/history.md @@ -8,15 +8,17 @@ This patch writes the loaded URI to a file. wart_ also provides a shell script using dmenu to display and select a URI: - cat ~/.surf/history | sort -r | uniq | dmenu -l 10 -b -i | xprop -id `cat ~/.surf/id` -f _SURF_URI 8s -set _SURF_URI + cat ~/.surf/history.txt | sort -r | uniq | dmenu -l 10 -b -i | xprop -id `cat ~/.surf/id` -f _SURF_URI 8s -set _SURF_URI Download -------- * [surf-0.2-history.diff](surf-0.2-history.diff) (891) (20091019) +* [surf-0.3-history.diff](surf-0.3-history.diff) (1475) (20091203) Authors ------- * Jason Thigpen (cdarwin) <[darwin@senet.us](mailto:darwin@senet.us)> * Peter John Hartman (wart_) <[peterjohnhartman@gmail.com](mailto:peterjohnhartman@gmail.com)> +* Samuel Baldwin (shardz) <[recursive.forest@gmail.com](mailto:recursive.forest@gmail.com)> diff --git a/surf.suckless.org/patches/surf-0.3-history.diff b/surf.suckless.org/patches/surf-0.3-history.diff @@ -0,0 +1,43 @@ +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);