diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-08-10 14:15:57 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-08-10 14:15:57 +0200 |
| commit | fe5e94571f9efaa54dbc1c91f6c84833f81acc40 (patch) | |
| tree | 8e1dc7f6acec733d4e75dadd038fa86b4e5aa309 | |
| parent | 5b707cea9131b1a459b9b8aeb7f73ee7492ff8dd (diff) | |
| download | dmenu-fe5e94571f9efaa54dbc1c91f6c84833f81acc40.tar.gz dmenu-fe5e94571f9efaa54dbc1c91f6c84833f81acc40.tar.bz2 dmenu-fe5e94571f9efaa54dbc1c91f6c84833f81acc40.zip | |
Added C-v binding for pasting
| -rw-r--r-- | config.h | 23 | ||||
| -rw-r--r-- | dmenu.c | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/config.h b/config.h new file mode 100644 index 0000000..1edb647 --- /dev/null +++ b/config.h @@ -0,0 +1,23 @@ +/* See LICENSE file for copyright and license details. */ +/* Default settings; can be overriden by command line. */ + +static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ +/* -fn option overrides fonts[0]; default X11 font or font set */ +static const char *fonts[] = { + "monospace:size=10" +}; +static const char *prompt = NULL; /* -p option; prompt to the left of input field */ +static const char *colors[SchemeLast][2] = { + /* fg bg */ + [SchemeNorm] = { "#bbbbbb", "#222222" }, + [SchemeSel] = { "#eeeeee", "#005577" }, + [SchemeOut] = { "#000000", "#00ffff" }, +}; +/* -l option; if nonzero, dmenu uses vertical list with given number of lines */ +static unsigned int lines = 0; + +/* + * Characters not considered part of a word while deleting words + * for example: " /?\"&[]" + */ +static const char worddelimiters[] = " "; @@ -354,6 +354,7 @@ keypress(XKeyEvent *ev) while (cursor > 0 && !strchr(worddelimiters, text[nextrune(-1)])) insert(NULL, nextrune(-1) - cursor); break; + case XK_v: /* paste selection */ case XK_y: /* paste selection */ case XK_Y: XConvertSelection(dpy, (ev->state & ShiftMask) ? clip : XA_PRIMARY, |
