[wiki] [sites] wiki updated
changeset: 498:4e654c64c411
tag: tip
user: Andrew Antle <andrew dot antle at gmail dot com>
date: Fri Apr 09 15:32:57 2010 -0400
files: surf.suckless.org/files/sprop_bookmarking.md
description:
Added a bookmarking setup using sprop
diff -r 499f391c1c11 -r 4e654c64c411 surf.suckless.org/files/sprop_bookmarking.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/surf.suckless.org/files/sprop_bookmarking.md Fri Apr 09 15:32:57 2010 -0400
_AT_@ -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>`
Received on Fri Apr 09 2010 - 21:34:54 CEST
This archive was generated by hypermail 2.3.0
: Thu Sep 13 2012 - 19:31:13 CEST