From b41d060e4ffd5d871f6b8636afe0507144ed7adb Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Mon, 5 Sep 2022 02:41:59 +0530 Subject: config changes for command calls --- config.h | 13 +++++++++++-- st | Bin 124200 -> 128872 bytes st.o | Bin 81184 -> 82968 bytes x.o | Bin 85272 -> 86088 bytes 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index af189e6..e55935c 100644 --- a/config.h +++ b/config.h @@ -228,6 +228,11 @@ static uint forcemousemod = ShiftMask; #define MODKEY Mod1Mask #define TERMMOD (ControlMask|ShiftMask) +/*defining External pipe commands */ +static char *openurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -o", "externalpipe", NULL }; +static char *copyurlcmd[] = { "/bin/sh", "-c", "st-urlhandler -c", "externalpipe", NULL }; +static char *copyoutput[] = { "/bin/sh", "-c", "st-copyout" , "externalpipe", NULL }; + /* * Internal mouse shortcuts. * Beware that overloading Button1 will disable the selection. @@ -252,7 +257,7 @@ static Shortcut shortcuts[] = { { TERMMOD, XK_Prior, zoom, {.f = +1} }, { TERMMOD, XK_Next, zoom, {.f = -1} }, { TERMMOD, XK_Home, zoomreset, {.f = 0} }, -//setting vim keys (j,k) for zooming and u for reset +//setting termmod(ctrl+shift) + vim keys (j,k) for zooming and u for reset { TERMMOD, XK_J, zoom, {.f = -1} }, { TERMMOD, XK_K, zoom, {.f = +1} }, { TERMMOD, XK_U, zoomreset, {.f = 0} }, @@ -266,7 +271,11 @@ static Shortcut shortcuts[] = { { MODKEY, XK_Down, kscrolldown, {.i = 1} }, //to scroll thru terminal page-wise { MODKEY, XK_Page_Up, kscrollup, {.i = -1} }, - { MODKEY, XK_Page_Down, kscrolldown, {.i = -1} }, + { MODKEY, XK_Page_Down, kscrolldown, {.i = -1} }, +//externalpipe bindings + { MODKEY, XK_O, externalpipe, {.v = openurlcmd } }, + { MODKEY, XK_L, externalpipe, {.v = copyurlcmd } }, + { MODKEY, XK_K, externalpipe, {.v = copyoutput } }, }; /* diff --git a/st b/st index 5e6fe9d..ff832db 100755 Binary files a/st and b/st differ diff --git a/st.o b/st.o index dd92628..2a3eb43 100644 Binary files a/st.o and b/st.o differ diff --git a/x.o b/x.o index 2279b06..74ba966 100644 Binary files a/x.o and b/x.o differ -- cgit v1.2.3