X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=config.def.h;h=50ce75dc6d3aba08908d9d319367bc354e6e5ddf;hb=5bca2223399bb18bada2a48db7411d181e3186e6;hp=a1baced7672ffd4905992ab03dfa7d6ee8b6519f;hpb=2d1e42236890b7495c0a9c4bce66420f937da559;p=surf.git diff --git a/config.def.h b/config.def.h index a1baced..50ce75d 100644 --- a/config.def.h +++ b/config.def.h @@ -1,7 +1,6 @@ /* modifier 0 means no modifier */ -static char *useragent = "Mozilla/5.0 (X11; U; Unix; en-US) " - "AppleWebKit/537.15 (KHTML, like Gecko) " - "Chrome/24.0.1295.0 Safari/537.15 Surf/"VERSION; +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 *cachedir = "~/.surf/cache/"; @@ -37,7 +36,7 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | WEBKIT_FIND_OPTIONS_WRAP_AROUND; #define SETPROP(p, q) { \ - .v = (char *[]){ "/bin/sh", "-c", \ + .v = (const char *[]){ "/bin/sh", "-c", \ "prop=\"`xprop -id $2 $0 " \ "| sed \"s/^$0(STRING) = \\(\\\\\"\\?\\)\\(.*\\)\\1$/\\2/\" " \ "| xargs -0 printf %b | dmenu`\" &&" \ @@ -48,7 +47,7 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | /* DOWNLOAD(URI, referer) */ #define DOWNLOAD(d, r) { \ - .v = (char *[]){ "/bin/sh", "-c", \ + .v = (const char *[]){ "/bin/sh", "-c", \ "st -e /bin/sh -c \"curl -L -J -O --user-agent '$1'" \ " --referer '$2' -b $3 -c $3 '$0';" \ " sleep 5;\"", \ @@ -61,7 +60,7 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | * "http://" or "https://" should be opened. */ #define PLUMB(u) {\ - .v = (char *[]){ "/bin/sh", "-c", \ + .v = (const char *[]){ "/bin/sh", "-c", \ "xdg-open \"$0\"", u, NULL \ } \ }