X-Git-Url: https://git.danieliu.xyz/?p=surf.git;a=blobdiff_plain;f=config.def.h;h=d90fc8d493b58bdd12e05a208fc5c42f764bc3a4;hp=a8a4a7bfac5460045d7677d0b3626270549361d7;hb=b8b0c050354d7961edeec74e644f09a3e2887074;hpb=654d527f87e59c6c9f507402878bed62398c4e61 diff --git a/config.def.h b/config.def.h index a8a4a7b..d90fc8d 100644 --- a/config.def.h +++ b/config.def.h @@ -55,18 +55,17 @@ static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | .v = (const char *[]){ "/bin/sh", "-c", \ "prop=\"$(printf '%b' \"$(xprop -id $1 $2 " \ "| sed \"s/^$2(STRING) = //;s/^\\\"\\(.*\\)\\\"$/\\1/\")\" " \ - "| dmenu)\" && xprop -id $1 -f $3 8s -set $3 \"$prop\"", \ + "| dmenu -w $1)\" && xprop -id $1 -f $3 8s -set $3 \"$prop\"", \ "surf-setprop", winid, r, s, NULL \ } \ } /* DOWNLOAD(URI, referer) */ -#define DOWNLOAD(d, r) { \ - .v = (const char *[]){ "/bin/sh", "-c", \ - "st -e /bin/sh -c \"curl -g -L -J -O --user-agent '$1'" \ - " --referer '$2' -b $3 -c $3 '$0';" \ - " sleep 5;\"", \ - d, useragent, r, cookiefile, NULL \ +#define DOWNLOAD(u, r) { \ + .v = (const char *[]){ "st", "-e", "/bin/sh", "-c",\ + "curl -g -L -J -O -A \"$1\" -b \"$2\" -c \"$2\"" \ + " -e \"$3\" \"$4\"; read", \ + "surf-download", useragent, cookiefile, r, u, NULL \ } \ }