From 5a10aca702bf7bc9094cb4abaea6c59558740d29 Mon Sep 17 00:00:00 2001 From: "greg.reagle@umbc.edu" Date: Mon, 10 Apr 2017 18:24:03 +0200 Subject: st.1: modify man page to accurately reflect default keybindings Attached. ===> 2/ (text/x-patch) [file] cp /mail/fs/mbox/298/2/body /usr/k0ga/0001-st.1-modify-man-page-to-accurately-reflect-default-k.patch From 265db94b1eca5850d484f86b7db4af8e57822cfe Mon Sep 17 00:00:00 2001 From: Greg Reagle Date: Sun, 9 Apr 2017 23:05:47 -0400 Subject: [PATCH] st.1: modify man page to accurately reflect default keybindings --- st.1 | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'st.1') diff --git a/st.1 b/st.1 index c429dcf..bbca7e5 100644 --- a/st.1 +++ b/st.1 @@ -142,28 +142,25 @@ Print the full screen to the Print the selection to the .I iofile. .TP -.B Alt-Shift-Page Up +.B Ctrl-Shift-Page Up Increase font size. .TP -.B Alt-Shift-Page Down +.B Ctrl-Shift-Page Down Decrease font size. .TP -.B Alt-Shift-Home +.B Ctrl-Shift-Home Reset to default font size. .TP -.B Shift-Insert +.B Ctrl-Shift-y Paste from primary selection (middle mouse button). .TP -.B Alt-Shift-Insert -Paste from clipboard selection. -.TP -.B Alt-Shift-c +.B Ctrl-Shift-c Copy the selected text to the clipboard selection. .TP -.B Alt-Shift-v +.B Ctrl-Shift-v Paste from the clipboard selection. .TP -.B Alt-Ctrl +.B Ctrl-Shift-i Launch dmenu to enter a unicode codepoint and send the corresponding glyph to st. .SH CUSTOMIZATION -- cgit v1.2.3 From 0ac685fc015362e749bf82cfaa3cfe2dd9b305f0 Mon Sep 17 00:00:00 2001 From: Paride Legovini Date: Tue, 10 Oct 2017 17:49:38 +0200 Subject: Fix manpage typo Signed-off-by: Paride Legovini --- st.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'st.1') diff --git a/st.1 b/st.1 index bbca7e5..81bceff 100644 --- a/st.1 +++ b/st.1 @@ -120,7 +120,7 @@ st executes instead of the shell. If this is used it .B must be the last option on the command line, as in xterm / rxvt. -This option is only intended for compability, +This option is only intended for compatibility, and all the remaining arguments are used as a command even without it. .SH SHORTCUTS -- cgit v1.2.3 From 67d0cb65d0794e2d91e72e5fa1e3612172e5812e Mon Sep 17 00:00:00 2001 From: Quentin Rameau Date: Tue, 11 Sep 2018 13:11:28 +0200 Subject: Remove the ISO 14755 feature And move it to the patches section. Keeping it would force to add an exec pledge on OpenBSD, and some people think it's bloated, so bye! --- config.def.h | 1 - st.1 | 4 ---- st.c | 26 -------------------------- st.h | 1 - 4 files changed, 32 deletions(-) (limited to 'st.1') diff --git a/config.def.h b/config.def.h index 82b1b09..823e79f 100644 --- a/config.def.h +++ b/config.def.h @@ -177,7 +177,6 @@ static Shortcut shortcuts[] = { { TERMMOD, XK_V, clippaste, {.i = 0} }, { TERMMOD, XK_Y, selpaste, {.i = 0} }, { TERMMOD, XK_Num_Lock, numlock, {.i = 0} }, - { TERMMOD, XK_I, iso14755, {.i = 0} }, }; /* diff --git a/st.1 b/st.1 index 81bceff..e8d6059 100644 --- a/st.1 +++ b/st.1 @@ -159,10 +159,6 @@ Copy the selected text to the clipboard selection. .TP .B Ctrl-Shift-v Paste from the clipboard selection. -.TP -.B Ctrl-Shift-i -Launch dmenu to enter a unicode codepoint and send the corresponding glyph -to st. .SH CUSTOMIZATION .B st can be customized by creating a custom config.h and (re)compiling the source diff --git a/st.c b/st.c index 76bb3ea..574dbee 100644 --- a/st.c +++ b/st.c @@ -38,15 +38,11 @@ /* macros */ #define IS_SET(flag) ((term.mode & (flag)) != 0) -#define NUMMAXLEN(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1) #define ISCONTROLC0(c) (BETWEEN(c, 0, 0x1f) || (c) == '\177') #define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f)) #define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c)) #define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL) -/* constants */ -#define ISO14755CMD "dmenu -w \"$WINDOWID\" -p codepoint: 7) - return; - if ((utf32 = strtoul(us, &e, 16)) == ULONG_MAX || - (*e != '\n' && *e != '\0')) - return; - - ttywrite(uc, utf8encode(utf32, uc), 1); -} - void toggleprinter(const Arg *arg) { diff --git a/st.h b/st.h index dac64d8..38c61c4 100644 --- a/st.h +++ b/st.h @@ -80,7 +80,6 @@ void die(const char *, ...); void redraw(void); void draw(void); -void iso14755(const Arg *); void printscreen(const Arg *); void printsel(const Arg *); void sendbreak(const Arg *); -- cgit v1.2.3 From 21e0d6e8b8d20903494386e7e6f43201b3761154 Mon Sep 17 00:00:00 2001 From: "Roberto E. Vargas Caballero" Date: Fri, 10 Apr 2020 22:06:32 +0200 Subject: Add support for scroll(1) Scroll is a program that stores all the lines of its child and be used in st as a way of implementing scrollback. This solution is much better than implementing the scrollback in st itself because having a different program allows to use it in any other program without doing modifications to those programs. --- config.def.h | 3 ++- st.1 | 3 ++- st.c | 16 ++++++++++------ st.h | 1 + 4 files changed, 15 insertions(+), 8 deletions(-) (limited to 'st.1') diff --git a/config.def.h b/config.def.h index 546edda..dfcbda9 100644 --- a/config.def.h +++ b/config.def.h @@ -11,13 +11,14 @@ static int borderpx = 2; /* * What program is execed by st depends of these precedence rules: * 1: program passed with -e - * 2: utmp option + * 2: scroll and/or utmp * 3: SHELL environment variable * 4: value of shell in /etc/passwd * 5: value of shell in config.h */ static char *shell = "/bin/sh"; char *utmp = NULL; +char *scroll = NULL; char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400"; /* identification sequence returned in DA and DECID */ diff --git a/st.1 b/st.1 index e8d6059..39120b4 100644 --- a/st.1 +++ b/st.1 @@ -170,7 +170,8 @@ See the LICENSE file for the terms of redistribution. .SH SEE ALSO .BR tabbed (1), .BR utmp (1), -.BR stty (1) +.BR stty (1), +.BR scroll (1) .SH BUGS See the TODO file in the distribution. diff --git a/st.c b/st.c index 3e48410..5f2352a 100644 --- a/st.c +++ b/st.c @@ -664,7 +664,7 @@ die(const char *errstr, ...) void execsh(char *cmd, char **args) { - char *sh, *prog; + char *sh, *prog, *arg; const struct passwd *pw; errno = 0; @@ -678,13 +678,17 @@ execsh(char *cmd, char **args) if ((sh = getenv("SHELL")) == NULL) sh = (pw->pw_shell[0]) ? pw->pw_shell : cmd; - if (args) + if (args) { prog = args[0]; - else if (utmp) - prog = utmp; - else + arg = NULL; + } else if (scroll || utmp) { + prog = scroll ? scroll : utmp; + arg = scroll ? utmp : NULL; + } else { prog = sh; - DEFAULT(args, ((char *[]) {prog, NULL})); + arg = NULL; + } + DEFAULT(args, ((char *[]) {prog, arg, NULL})); unsetenv("COLUMNS"); unsetenv("LINES"); diff --git a/st.h b/st.h index a1928ca..d978458 100644 --- a/st.h +++ b/st.h @@ -113,6 +113,7 @@ char *xstrdup(char *); /* config.h globals */ extern char *utmp; +extern char *scroll; extern char *stty_args; extern char *vtiden; extern wchar_t *worddelimiters; -- cgit v1.2.3