sites

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

commit f248731ff13efb1f18e8b1f6040cfe6ee85c139d
parent d31cffb01d9dfabe7cc180471beed3cca43e4ce1
Author: Andrew Antle <andrew dot antle at gmail dot com>
Date:   Fri,  9 Apr 2010 15:32:57 -0400

Added a bookmarking setup using sprop
Diffstat:
Asurf.suckless.org/files/sprop_bookmarking.md | 44++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+), 0 deletions(-)

diff --git a/surf.suckless.org/files/sprop_bookmarking.md b/surf.suckless.org/files/sprop_bookmarking.md @@ -0,0 +1,44 @@ +SPROP BOOKMARKING +================= + +Description +----------- +Create bma.sh in your $PATH: + + $ cat ~/bin/bma.sh + #!/bin/sh + + BMARKS=$HOME/.surf/bmarks + URI="`sprop $1 _SURF_URI`" + + echo "$URI" >> $BMARKS + +Create bml.sh in your $PATH, as well: + + $ cat ~/bin/bml.sh + #!/bin/sh + + CACHE=$HOME/.surf/bmarks + + cat "$CACHE" | sort | uniq > "$CACHE".$$ && + mv "$CACHE".$$ "$CACHE" + + cat "$CACHE" | dmenu + +Modify your config.h just before the definition of `keys[]`: + + #define BMA { .v = (char *[]){ "/bin/sh", "-c", \ + "bma.sh $0", winid, NULL } } + + #define BML(p) { .v = (char *[]){ "/bin/sh", "-c", \ + "sprop $1 $0 `bml.sh` || exit 0", \ + winid, NULL } } + +Then, inside `keys[]`, add: + + { MODKEY, GDK_b, spawn, BML("_SURF_URI") }, + { MODKEY|GDK_SHIFT_MASK,GDK_b, spawn, BMA }, + +Author +------ +Andrew Antle `<andrew dot antle at gmail dot com>`