X-Git-Url: https://git.danieliu.xyz/?p=surf.git;a=blobdiff_plain;f=config.def.h;h=a8a4a7bfac5460045d7677d0b3626270549361d7;hp=5fb79deacc230c404ce35337fa880b4e4e32952d;hb=654d527f87e59c6c9f507402878bed62398c4e61;hpb=e23d5c1c45eeedb3e95219598981d8e1d6af8c15 diff --git a/config.def.h b/config.def.h index 5fb79de..a8a4a7b 100644 --- a/config.def.h +++ b/config.def.h @@ -50,13 +50,13 @@ static int winsize[] = { 800, 600 }; static WebKitFindOptions findopts = WEBKIT_FIND_OPTIONS_CASE_INSENSITIVE | WEBKIT_FIND_OPTIONS_WRAP_AROUND; -#define SETPROP(p, q) { \ +/* SETPROP(readprop, setprop)*/ +#define SETPROP(r, s) { \ .v = (const char *[]){ "/bin/sh", "-c", \ - "prop=\"`xprop -id $2 $0 " \ - "| sed \"s/^$0(STRING) = \\(\\\\\"\\?\\)\\(.*\\)\\1$/\\2/\" " \ - "| xargs -0 printf %b | dmenu`\" &&" \ - "xprop -id $2 -f $1 8s -set $1 \"$prop\"", \ - p, q, winid, NULL \ + "prop=\"$(printf '%b' \"$(xprop -id $1 $2 " \ + "| sed \"s/^$2(STRING) = //;s/^\\\"\\(.*\\)\\\"$/\\1/\")\" " \ + "| dmenu)\" && xprop -id $1 -f $3 8s -set $3 \"$prop\"", \ + "surf-setprop", winid, r, s, NULL \ } \ }