sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

index.md (1854B)


      1 History
      2 =======
      3 
      4 Description
      5 -----------
      6 
      7 This patch writes the loaded URI to a file and that is all it does.  You must modify config.h and 
      8 add the following:
      9 
     10 	static char *historyfile        = ".surf/history";
     11 
     12 Here are some ways of using it.
     13 
     14 1. Write a small shell script (dmenu.uri.sh)
     15 
     16    	tac ~/.surf/history | dmenu -l 10 -b -i | cut -d ' ' -f 3
     17 
     18 2. Modify config.h and add the following.
     19 
     20    	#define SETURI(p)       { .v = (char *[]){ "/bin/sh", "-c", \
     21    	"prop=\"`dmenu.uri.sh`\" &&" \
     22    	"xprop -id $1 -f $0 8s -set $0 \"$prop\"", \
     23    	p, winid, NULL } }
     24 
     25    and in static Key keys[] add:
     26 
     27    	{ MODKEY,               GDK_Return, spawn,      SETURI("_SURF_GO") },
     28 
     29 Here are some tips on using it.
     30 
     31 1. Remove duplicates periodically:
     32 
     33 	cat ~/.surf/history > ~/.surf/history.$$
     34 	cat ~/.surf/history.$$ | sort | uniq >~/.surf/history
     35 	rm -f ~/.surf/history.$$
     36 
     37 2. Import history:
     38 
     39 Firefox:
     40 	sqlite3 -list $HOME/.mozilla/firefox/*.default/places.sqlite 'select url from moz_places ;' | grep ^http >> ~/.surf/history
     41 
     42 Chromium:
     43 	sqlite3 -list $HOME/.config/chromium/Default/History 'select url from urls' | grep ^http >> ~/.surf/history
     44 
     45 Download
     46 --------
     47 
     48 * [surf-0.2-history.diff](surf-0.2-history.diff) (891) (20091019)
     49 * [surf-0.3-history.diff](surf-0.3-history.diff) (1475) (20091203)
     50 * [surf-tip-history.diff](surf-tip-history.diff) (2952) (20091215)
     51 * [surf-0.4.1-history.diff](surf-0.4.1-history.diff) (1346) (20101225)
     52 * [surf-history-20181009-2b71a22.diff](surf-history-20181009-2b71a22.diff) (3405) (20181009)
     53 * [surf-2.1-history.diff](surf-2.1-history.diff) (1645) (20211114)
     54 
     55 Authors
     56 -------
     57 
     58 * Jason Thigpen (cdarwin) <darwin@senet.us>
     59 * Peter John Hartman (wart_) <http://durandus.trilidun.org/durandus/>
     60 * Samuel Baldwin (shardz) <recursive.forest@gmail.com>
     61 * Marcin sZpak <szpak@reakcja.org>
     62 * Howard Cornwell <h@abbcd.net>