surf

Simple browser by suckless.org (fork)
git clone git://git.ckyln.com/surf.git
Log | Files | Refs | README | LICENSE

commit c125f069fe98f17841a1a679cf9e5fc033795c01
parent ea2692837124bed94773065ff373ae34dff95024
Author: Cem Keylan <cem@ckyln.com>
Date:   Sun, 24 Nov 2019 10:36:58 +0300

new bookmarking patch

Diffstat:
Mconfig.def.h | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/config.def.h b/config.def.h @@ -118,6 +118,21 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \ p, winid, NULL } } + +#define ADDBMK { \ + .v = (char *[]){ "/bin/sh", "-c", \ + "bookmarkurl $0", winid, NULL \ + } \ +} + + +#define LOADBMK(r, s, p) { \ + .v = (const char *[]){ "/bin/sh", "-c", \ + "prop=\"$(loadbookmark $1)\" && xprop -id $1 -f $3 8s -set $3 \"$prop\"", \ + "surf-setprop", winid, r, s, p, NULL \ + } \ +} + /* styles */ /* * The iteration will stop at the first match, beginning at the beginning of @@ -219,6 +234,8 @@ static Key keys[] = { { MODKEY|GDK_SHIFT_MASK, GDK_KEY_e, externalpipe, { .v = editscreen } }, { MODKEY, GDK_KEY_y, externalpipe, { .v = yanklink } }, { MODKEY, GDK_KEY_s, spawn, SEARCH() }, + { 0, GDK_KEY_m, spawn, ADDBMK }, + { 0|GDK_SHIFT_MASK, GDK_KEY_m, spawn, LOADBMK("_SURF_URI", "_SURF_GO", PROMPT_GO) }, { MODKEY, GDK_KEY_w, playexternal, { 0 } }, };