all repos — st @ 93f31166bfff317e050dde1723cfa8302c6f85d3

st (suckless terminal) config

Move Shift + Insert to shortcut

Shift + Insert is used like a hot key for paste the selection, so it is more
logical move it to shortcut array instead of having special code for it.
---
 config.def.h |    1 +
 st.c         |   13 +++----------
 2 files changed, 4 insertions(+), 10 deletions(-)
Roberto E. Vargas Caballero k0ga@shike2.com
commit

93f31166bfff317e050dde1723cfa8302c6f85d3

parent

69ee3ba3a771ca60bc8738174c79fc851818a36b

2 files changed, 4 insertions(+), 10 deletions(-)

jump to
M config.def.hconfig.def.h

@@ -93,5 +93,6 @@ static Shortcut shortcuts[] = {

/* modifier key function argument */ { MODKEY|ShiftMask, XK_Prior, xzoom, {.i = +1} }, { MODKEY|ShiftMask, XK_Next, xzoom, {.i = -1} }, + { ShiftMask, XK_Insert, selpaste, {.i = 0} }, };
M st.cst.c

@@ -261,6 +261,7 @@ } Shortcut;

/* function definitions used in config.h */ static void xzoom(const Arg *); +static void selpaste(const Arg *); /* Config.h for applying patches and the configuration. */ #include "config.h"

@@ -360,7 +361,6 @@

static void selinit(void); static inline bool selected(int, int); static void selcopy(void); -static void selpaste(void); static void selscroll(int, int); static int utf8decode(char *, long *);

@@ -750,7 +750,7 @@ } while(rem > 0);

} void -selpaste(void) { +selpaste(const Arg *dummy) { XConvertSelection(xw.dpy, XA_PRIMARY, sel.xtarget, XA_PRIMARY, xw.win, CurrentTime); }

@@ -821,7 +821,7 @@ return;

} if(e->xbutton.button == Button2) { - selpaste(); + selpaste(NULL); } else if(e->xbutton.button == Button1) { sel.mode = 0; getbuttoninfo(e, NULL, &sel.ex, &sel.ey);

@@ -2742,13 +2742,6 @@ sprintf(buf, "\033%c%c",

IS_SET(MODE_APPKEYPAD) ? 'O' : '[', (shift ? "dacb":"DACB")[ksym - XK_Left]); len = 3; - break; - case XK_Insert: - if(shift) { - selpaste(); - return; - } - memcpy(buf, xstr, len); break; case XK_Return: len = 0;