[wiki] [sites] Add surf patch to fix unicode usage in actions with xprops and dmenu || Danil Semelenov

From: <git_AT_suckless.org>
Date: Fri, 18 Sep 2015 22:43:15 +0200

commit 383b7b2dfd5ef98291e24dbff7de64f19c79d902
Author: Danil Semelenov <mail_AT_danil.mobi>
Date: Fri Sep 18 23:42:14 2015 +0300

    Add surf patch to fix unicode usage in actions with xprops and dmenu

diff --git a/surf.suckless.org/patches/surf-0.6-dmenu-unicode.diff b/surf.suckless.org/patches/surf-0.6-dmenu-unicode.diff
new file mode 100644
index 0000000..81a775f
--- /dev/null
+++ b/surf.suckless.org/patches/surf-0.6-dmenu-unicode.diff
_AT_@ -0,0 +1,26 @@
+diff --git a/config.def.h b/config.def.h
+index a221c86..ac35199 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -27,7 +27,7 @@ static Bool hidebackground = FALSE;
+ #define SETPROP(p, q) { \
+ .v = (char *[]){ "/bin/sh", "-c", \
+ "prop=\"`xprop -id $2 $0 | cut -d '\"' -f 2 | dmenu`\" &&" \
+- "xprop -id $2 -f $1 8s -set $1 \"$prop\"", \
++ "xprop -id $2 -f $1 8u -set $1 \"$prop\"", \
+ p, q, winid, NULL \
+ } \
+ }
+diff --git a/surf.c b/surf.c
+index cebd469..b467bbd 100644
+--- a/surf.c
++++ b/surf.c
+_AT_@ -475,7 +475,7 @@ getatom(Client *c, int a) {
+ unsigned char *p = NULL;
+
+ XGetWindowProperty(dpy, GDK_WINDOW_XID(GTK_WIDGET(c->win)->window),
+- atoms[a], 0L, BUFSIZ, False, XA_STRING,
++ atoms[a], 0L, BUFSIZ, False, AnyPropertyType,
+ &adummy, &idummy, &ldummy, &ldummy, &p);
+ if(p)
+ strncpy(buf, (char *)p, LENGTH(buf)-1);
diff --git a/surf.suckless.org/patches/unicode-in-dmenu.md b/surf.suckless.org/patches/unicode-in-dmenu.md
new file mode 100644
index 0000000..63fc8c0
--- /dev/null
+++ b/surf.suckless.org/patches/unicode-in-dmenu.md
_AT_@ -0,0 +1,17 @@
+Unicode in dmenu
+================
+
+Description
+-----------
+
+This patch adds Unicode support to actions with dmenu: opening URL and finding in page.
+
+Download
+--------
+
+* [surf-0.6-dmenu-unicode.diff](surf-0.6-dmenu-unicode.diff) (0.8k) (18 Sep 2015)
+
+Author
+------
+
+* Danil Semelenov - `<mail at danil dot mobi>`
Received on Fri Sep 18 2015 - 22:43:15 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 18 2015 - 22:48:11 CEST