Embed dmenu into the surf window by default
[surf.git] / config.def.h
index a8a4a7b..d90fc8d 100644 (file)
@@ -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 \
         } \
 }