I've started using st and have some questions/issues:

1) To get the foreground colour I want, I changed index 7 of colorname[] to grey -- will this have any strange site effects? 2) The foreground colour "brightblack" in mutt (which shows as a grey in xterm/rxvt) shows as straight black, which is not nice against my black background. 3) How do I scroll up the scrollbuffer? The Shift+PageUp I'm used to does not seem to work. 4) alt+leftarrow and alt+rightarrow, which I use in irssi to swich chats, do not seem to work. Looking at st.c, it seems that kpress handles the arrow keys specially, which may be breaking this?

I've also created a small patch, attached, which allows one to paste the contents of CLIPBOARD with alt+shift+insert.

--
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph
diff --git a/st.c b/st.c
index 72e57c8..ccdbc42 100644
--- a/st.c
+++ b/st.c
@@ -237,6 +237,7 @@ static void selinit(void);
 static inline int selected(int, int);
 static void selcopy(void);
 static void selpaste();
+static void clipboardpaste();
 static void selscroll(int, int);
 
 static int utf8decode(char *, long *);
@@ -520,6 +521,12 @@ selpaste() {
 }
 
 void
+clipboardpaste() {
+	Atom clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0);
+	XConvertSelection(xw.dpy, clipboard, sel.xtarget, XA_PRIMARY, xw.win, CurrentTime);
+}
+
+void
 selrequest(XEvent *e) {
 	XSelectionRequestEvent *xsre;
 	XSelectionEvent xev;
@@ -1911,8 +1918,12 @@ kpress(XEvent *ev) {
 			ttywrite(buf, 3);
 			break;
 		case XK_Insert:
-			if(shift)
-				selpaste();
+			if(shift) {
+				if(meta)
+					clipboardpaste();
+				else
+					selpaste();
+			}
 			break;
 		case XK_Return:
 			if(IS_SET(MODE_CRLF))

Attachment: signature.asc
Description: Digital signature

Reply via email to