static size_t cursor = 0;
static const char *font = NULL;
static const char *prompt = NULL;
static size_t cursor = 0;
static const char *font = NULL;
static const char *prompt = NULL;
-static const char *normbgcolor = "#cccccc";
-static const char *normfgcolor = "#000000";
-static const char *selbgcolor = "#0066ff";
-static const char *selfgcolor = "#ffffff";
+static const char *normbgcolor = "#222222";
+static const char *normfgcolor = "#bbbbbb";
+static const char *selbgcolor = "#005577";
+static const char *selfgcolor = "#eeeeee";
static unsigned int lines = 0;
static unsigned long normcol[ColLast];
static unsigned long selcol[ColLast];
static unsigned int lines = 0;
static unsigned long normcol[ColLast];
static unsigned long selcol[ColLast];
case XK_i: ksym = XK_Tab; break;
case XK_j: ksym = XK_Return; break;
case XK_m: ksym = XK_Return; break;
case XK_i: ksym = XK_Tab; break;
case XK_j: ksym = XK_Return; break;
case XK_m: ksym = XK_Return; break;
insert(NULL, nextrune(-1) - cursor);
break;
case XK_y: /* paste selection */
insert(NULL, nextrune(-1) - cursor);
break;
case XK_y: /* paste selection */
- XConvertSelection(dc->dpy, XA_PRIMARY, utf8, utf8, win, CurrentTime);
+ XConvertSelection(dc->dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY,
+ utf8, utf8, win, CurrentTime);
selcol[ColBG] = getcolor(dc, selbgcolor);
selcol[ColFG] = getcolor(dc, selfgcolor);
selcol[ColBG] = getcolor(dc, selbgcolor);
selcol[ColFG] = getcolor(dc, selfgcolor);
utf8 = XInternAtom(dc->dpy, "UTF8_STRING", False);
/* calculate menu geometry */
utf8 = XInternAtom(dc->dpy, "UTF8_STRING", False);
/* calculate menu geometry */
swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
win = XCreateWindow(dc->dpy, root, x, y, mw, mh, 0,
DefaultDepth(dc->dpy, screen), CopyFromParent,
DefaultVisual(dc->dpy, screen),
swa.event_mask = ExposureMask | KeyPressMask | VisibilityChangeMask;
win = XCreateWindow(dc->dpy, root, x, y, mw, mh, 0,
DefaultDepth(dc->dpy, screen), CopyFromParent,
DefaultVisual(dc->dpy, screen),
/* open input methods */
xim = XOpenIM(dc->dpy, NULL, NULL, NULL);
/* open input methods */
xim = XOpenIM(dc->dpy, NULL, NULL, NULL);