#define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL)
/* constants */
-#define ISO14755CMD "dmenu -w %lu -p codepoint: </dev/null"
+#define ISO14755CMD "dmenu -w \"$WINDOWID\" -p codepoint: </dev/null"
enum cursor_movement {
CURSOR_SAVE,
setenv("SHELL", sh, 1);
setenv("HOME", pw->pw_dir, 1);
setenv("TERM", termname, 1);
- xsetenv();
signal(SIGCHLD, SIG_DFL);
signal(SIGHUP, SIG_DFL);
void
iso14755(const Arg *arg)
{
- unsigned long id = xwinid();
- char cmd[sizeof(ISO14755CMD) + NUMMAXLEN(id)];
FILE *p;
char *us, *e, codepoint[9], uc[UTF_SIZ];
unsigned long utf32;
- snprintf(cmd, sizeof(cmd), ISO14755CMD, id);
- if (!(p = popen(cmd, "r")))
+ if (!(p = popen(ISO14755CMD, "r")))
return;
us = fgets(codepoint, sizeof(codepoint), p);
void xloadcols(void);
int xsetcolorname(int, const char *);
void xloadfonts(char *, double);
-void xsetenv(void);
void xsettitle(char *);
void xsetpointermotion(int);
void xseturgency(int);
void xunloadfonts(void);
void xresize(int, int);
void xselpaste(void);
-unsigned long xwinid(void);
void xsetsel(char *, Time);
static int xgeommasktogravity(int);
static int xloadfont(Font *, FcPattern *);
static void xunloadfont(Font *);
+static void xsetenv(void);
static void expose(XEvent *);
static void visibility(XEvent *);
XkbBell(xw.dpy, xw.win, vol, (Atom)NULL);
}
-unsigned long
-xwinid(void)
-{
- return xw.win;
-}
-
void
focus(XEvent *ev)
{
XSetLocaleModifiers("");
tnew(MAX(cols, 1), MAX(rows, 1));
xinit();
+ xsetenv();
selinit();
run();