]> Skullheadx's Git Forge - surf.git/commitdiff
update config.def.h
authorSkullheadx <admonty1@protonmail.com>
Mon, 4 May 2026 22:23:51 +0000 (18:23 -0400)
committerSkullheadx <admonty1@protonmail.com>
Mon, 4 May 2026 22:23:51 +0000 (18:23 -0400)
config.def.h

index 9b0f6f68cf429484f755a58cb1aa93828ada523d..b8ede9a2917e42b0b06b4e8b2eeaf38a6c9b4562 100644 (file)
@@ -1,11 +1,11 @@
 /* modifier 0 means no modifier */
 static int surfuseragent    = 1;  /* Append Surf version to default WebKit user agent */
 static char *fulluseragent  = ""; /* Or override the whole user agent string */
-static char *scriptfile     = "~/.surf/script.js";
-static char *styledir       = "~/.surf/styles/";
-static char *certdir        = "~/.surf/certificates/";
-static char *cachedir       = "~/.surf/cache/";
-static char *cookiefile     = "~/.surf/cookies.txt";
+static char *scriptfile     = "~/.config/surf/script.js";
+static char *styledir       = "~/.config/surf/styles/";
+static char *certdir        = "~/.local/share/surf/certificates/";
+static char *cachedir       = "~/.cache/surf/cache/";
+static char *cookiefile     = "~/.local/share/surf/cookies.txt";
 
 /* Webkit default features */
 /* Highest priority value will be used.
@@ -20,16 +20,16 @@ static Parameter defconfig[ParameterLast] = {
        [Certificate]         =       { { .i = 0 },     },
        [CaretBrowsing]       =       { { .i = 0 },     },
        [CookiePolicies]      =       { { .v = "@Aa" }, },
-       [DarkMode]            =       { { .i = 0 },     },
+       [DarkMode]            =       { { .i = 1 },     },
        [DefaultCharset]      =       { { .v = "UTF-8" }, },
        [DiskCache]           =       { { .i = 1 },     },
        [DNSPrefetch]         =       { { .i = 0 },     },
        [Ephemeral]           =       { { .i = 0 },     },
        [FileURLsCrossAccess] =       { { .i = 0 },     },
-       [FontSize]            =       { { .i = 12 },    },
+       [FontSize]            =       { { .i = 16 },    },
        [Geolocation]         =       { { .i = 0 },     },
        [HideBackground]      =       { { .i = 0 },     },
-       [Inspector]           =       { { .i = 0 },     },
+       [Inspector]           =       { { .i = 1 },     },
        [JavaScript]          =       { { .i = 1 },     },
        [KioskMode]           =       { { .i = 0 },     },
        [LoadImages]          =       { { .i = 1 },     },
@@ -40,7 +40,7 @@ static Parameter defconfig[ParameterLast] = {
        [ScrollBars]          =       { { .i = 1 },     },
        [ShowIndicators]      =       { { .i = 1 },     },
        [SiteQuirks]          =       { { .i = 1 },     },
-       [SmoothScrolling]     =       { { .i = 0 },     },
+       [SmoothScrolling]     =       { { .i = 1 },     },
        [SpellChecking]       =       { { .i = 0 },     },
        [SpellLanguages]      =       { { .v = ((char *[]){ "en_US", NULL }) }, },
        [StrictTLS]           =       { { .i = 1 },     },
@@ -64,18 +64,14 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE |
 #define PROMPT_GO   "Go:"
 #define PROMPT_FIND "Find:"
 
-/* SETPROP(readprop, setprop, prompt)*/
-#define SETPROP(r, s, p) { \
-        .v = (const char *[]){ "/bin/sh", "-c", \
-             "prop=\"$(printf '%b' \"$(xprop -id $1 "r" " \
-             "| sed -e 's/^"r"(UTF8_STRING) = \"\\(.*\\)\"/\\1/' " \
-             "      -e 's/\\\\\\(.\\)/\\1/g')\" " \
-             "| dmenu -p '"p"' -w $1)\" " \
-             "&& xprop -id $1 -f "s" 8u -set "s" \"$prop\"", \
-             "surf-setprop", winid, NULL \
-        } \
+/* SETPROP(readprop, setprop)*/
+#define SETPROP(p, s) { \
+    .v = (const char *[]){ "/bin/sh", "-c", \
+        "surf.sh $1 $2 $3", "surf-sh", p, s, winid, NULL \
+    } \
 }
 
+
 /* DOWNLOAD(URI, referer) */
 #define DOWNLOAD(u, r) { \
         .v = (const char *[]){ "st", "-e", "/bin/sh", "-c",\
@@ -130,9 +126,15 @@ static SiteSpecific certs[] = {
  */
 static Key keys[] = {
        /* modifier              keyval          function    arg */
-       { MODKEY,                GDK_KEY_g,      spawn,      SETPROP("_SURF_URI", "_SURF_GO", PROMPT_GO) },
-       { MODKEY,                GDK_KEY_f,      spawn,      SETPROP("_SURF_FIND", "_SURF_FIND", PROMPT_FIND) },
-       { MODKEY,                GDK_KEY_slash,  spawn,      SETPROP("_SURF_FIND", "_SURF_FIND", PROMPT_FIND) },
+       { MODKEY,                GDK_KEY_g,      spawn,      SETPROP("_SURF_URI", "_SURF_GO") },
+       /*{ MODKEY,                GDK_KEY_f,      spawn,      SETPROP("_SURF_FIND", "_SURF_FIND") },*/
+       { MODKEY,                GDK_KEY_slash,  spawn,      SETPROP("_SURF_FIND", "_SURF_FIND") },
+
+       /* bookmarks */
+       { MODKEY,                GDK_KEY_b,      spawn,     SETPROP("_SURF_BMARK", "_SURF_GO") },
+       { MODKEY|GDK_SHIFT_MASK, GDK_KEY_i,      spawn,     SETPROP("_SURF_INFO", "_SURF_GO") },
+       { MODKEY|GDK_SHIFT_MASK, GDK_KEY_g,      spawn,     SETPROP("_SURF_URI_RAW", "_SURF_GO") },
+
 
        { 0,                     GDK_KEY_Escape, stop,       { 0 } },
        { MODKEY,                GDK_KEY_c,      stop,       { 0 } },
@@ -179,6 +181,8 @@ static Key keys[] = {
        { MODKEY|GDK_SHIFT_MASK, GDK_KEY_t,      toggle,     { .i = StrictTLS } },
        { MODKEY|GDK_SHIFT_MASK, GDK_KEY_m,      toggle,     { .i = Style } },
        { MODKEY|GDK_SHIFT_MASK, GDK_KEY_d,      toggle,     { .i = DarkMode } },
+
+
 };
 
 /* button definitions */