X-Git-Url: https://git.danieliu.xyz/?p=surf.git;a=blobdiff_plain;f=config.def.h;h=bb2b4a93c213c0b9915b4174f39b0c95f15758e3;hp=5364cea24fea2141e2efdc37943e3adc703bb4b0;hb=1f04725ac4e99f377d90b21e487a5d019fafda08;hpb=59468d80c37f1c5f1638c7dcd88faa6595eb9898 diff --git a/config.def.h b/config.def.h index 5364cea..bb2b4a9 100644 --- a/config.def.h +++ b/config.def.h @@ -7,6 +7,13 @@ static char *certdir = "~/.surf/certificates/"; static char *cachedir = "~/.surf/cache/"; static char *cookiefile = "~/.surf/cookies.txt"; +static SearchEngine searchengines[] = { + { "g", "https://www.google.com/search?q=%s" }, + { "ji", "https://jisho.org/search/%s" }, + { "aw", "https://wiki.archlinux.org/index.php?search=%s" }, + { "s", "https://searx.danieliu.xyz/?q=%s" } +}; + /* Webkit default features */ /* Highest priority value will be used. * Default parameters are priority 0 @@ -99,7 +106,7 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | /* VIDEOPLAY(URI) */ #define VIDEOPLAY(u) {\ .v = (const char *[]){ "/bin/sh", "-c", \ - "mpv --really-quiet \"$0\"", u, NULL \ + "notify-send 'Opening video in mpv...' & mpv --really-quiet \"$0\"", u, NULL \ } \ } @@ -147,6 +154,8 @@ static Key keys[] = { { MODKEY, GDK_KEY_slash, spawn, SETPROP("_SURF_FIND", "_SURF_FIND", PROMPT_FIND) }, { MODKEY, GDK_KEY_m, spawn, BM_ADD("_SURF_URI") }, + { MODKEY, GDK_KEY_w, playexternal, { 0 } }, + { 0, GDK_KEY_Escape, stop, { 0 } }, { MODKEY, GDK_KEY_c, stop, { 0 } }, @@ -206,3 +215,5 @@ static Button buttons[] = { { OnAny, 0, 9, clicknavigate, { .i = +1 }, 1 }, { OnMedia, MODKEY, 1, clickexternplayer, { 0 }, 1 }, }; + +#define HOMEPAGE "https://searx.danieliu.xyz/"