Hello,
Please find the patch in the attachment.
Thanks,Aleksei
From f27df580696d679848999bfd073a93f6cbd960bc Mon Sep 17 00:00:00 2001
From: Alex Kozadaev <akozadaev at yahoo com>
Date: Tue, 28 Jul 2015 13:21:02 +0100
Subject: [PATCH] adding feature similar to xterm*selectToClipboard
---
config.def.h | 5 +++++
st.c | 3 +++
2 files changed, 8 insertions(+)
diff --git a/config.def.h b/config.def.h
index 930e468..a0a5160 100644
--- a/config.def.h
+++ b/config.def.h
@@ -121,6 +121,11 @@ static unsigned int mousebg = 0;
static unsigned int defaultitalic = 11;
static unsigned int defaultunderline = 7;
+/*
+ * This is similar to XTerm*selectToClipboard, which makes PRIMARY == CLIPBOARD
+ */
+static Bool copytoclipboard = False;
+
/* Internal mouse shortcuts. */
/* Beware that overloading Button1 will disable the selection. */
static Mousekey mshortcuts[] = {
diff --git a/st.c b/st.c
index 1df4fde..c69a7bc 100644
--- a/st.c
+++ b/st.c
@@ -1042,6 +1042,9 @@ void
selcopy(Time t)
{
xsetsel(getsel(), t);
+ if (copytoclipboard == True) {
+ clipcopy(&(Arg){.i = 0});
+ }
}
void
--
2.1.4