[wiki] [sites] wiki updated

From: <hg_AT_suckless.org>
Date: Tue, 19 Jan 2010 15:26:03 +0000 (UTC)

changeset: 434:e7c2f8f513b5
tag: tip
user: wart_
date: Tue Jan 19 10:25:17 2010 -0500
files: surf.suckless.org/patches/history.md
description:
updated with new information


diff -r 313438c846fa -r e7c2f8f513b5 surf.suckless.org/patches/history.md
--- a/surf.suckless.org/patches/history.md Sun Jan 17 14:02:00 2010 +0100
+++ b/surf.suckless.org/patches/history.md Tue Jan 19 10:25:17 2010 -0500
_AT_@ -4,17 +4,41 @@
 Description
 -----------
 
-This patch writes the loaded URI to a file.
+This patch writes the loaded URI to a file and that is all it does. You must modify config.h and
+add the following:
 
-wart_ also provides a shell script using dmenu to display and select a URI:
+static char *historyfile = ".surf/history";
 
- cat ~/.surf/history.txt | sort -r | uniq | dmenu -l 10 -b -i | xprop -id `cat ~/.surf/id` -f _SURF_URI 8s -set _SURF_URI
+Here are some ways of using it.
 
-Tip: You might want to put this in your surf start script:
+1. Write a small shell script.
 
- cat ~/.surf/history.txt | sort -u >~/.surf/history.txt
+ #!/bin/sh
+ cat ~/.surf/history | sort -ru | dmenu -l 10 -b -i | xprop -id `cat ~/.surf/id` -f SURF_URI 8s -set _SURF_URI
 
-This works well in conjunction with the dmenu history patch.
+2. Modify config.h and add the following.
+
+#define SETURI(p) { .v = (char *[]){ "/bin/sh", "-c", \
+ "prop=\"`dmenu.uri.sh`\" &&" \
+ "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
+ p, winid, NULL } }
+
+Add, in static Key keys[] add:
+
+{ MODKEY, GDK_Return, spawn, SETURI("_SURF_URI") },
+
+Here are some tips on using it.
+
+1. Remove duplicates periodically:
+
+ cat ~/.surf/history > ~/.surf/history.$$
+ cat ~/.surf/history.$$ | sort | uniq >~/.surf/history
+ rm -f ~/.surf/history.$$
+
+2. Import firefox history:
+
+ sqlite3 -list /home/$USER/.mozilla/firefox/*.default/places.sqlite 'select url from moz_places ;' |\
+ grep http >> ~/.surf/history
 
 Download
 --------
_AT_@ -27,5 +51,5 @@
 -------
 
 * Jason Thigpen (cdarwin) <[darwin_AT_senet.us](mailto:darwin_AT_senet.us)>
-* Peter John Hartman (wart_) <[http://antiopus.trilidun.org/durandus/](htttp://antiopus.trilidun.org/durandus/)>
+* Peter John Hartman (wart_) <[http://durandus.trilidun.org/durandus/](htttp://durandus.trilidun.org/durandus/)>
 * Samuel Baldwin (shardz) <[recursive.forest_AT_gmail.com](mailto:recursive.forest_AT_gmail.com)>
Received on Tue Jan 19 2010 - 16:26:03 CET

This archive was generated by hypermail 2.3.0 : Thu Sep 13 2012 - 19:31:06 CEST