From a3b2def54ff06eb56f0864337360b6692658bb23 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 17 Jul 2019 23:09:34 -0400 Subject: Add ^Q to ptee for MC sequence --- bin/man1/ptee.1 | 6 +++++- bin/ptee.c | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/man1/ptee.1 b/bin/man1/ptee.1 index a38d61c7..04f9cdac 100644 --- a/bin/man1/ptee.1 +++ b/bin/man1/ptee.1 @@ -1,4 +1,4 @@ -.Dd July 8, 2019 +.Dd July 17, 2019 .Dt PTEE 1 .Os . @@ -27,6 +27,10 @@ to a file or pipe. Type .Ic ^S to toggle writing to standard output. +Type +.Ic ^Q +to write the media copy sequence for +.Xr shotty 1 . . .Sh SEE ALSO .Xr tee 1 diff --git a/bin/ptee.c b/bin/ptee.c index a5f9d954..6a9a16b4 100644 --- a/bin/ptee.c +++ b/bin/ptee.c @@ -83,6 +83,13 @@ int main(int argc, char *argv[]) { continue; } + if (rlen == 1 && buf[0] == CTRL('Q')) { + char dump[] = "\x1B[10i"; + ssize_t wlen = write(STDOUT_FILENO, dump, sizeof(dump) - 1); + if (wlen < 0) err(EX_IOERR, "write"); + continue; + } + ssize_t wlen = write(pty, buf, rlen); if (wlen < 0) err(EX_IOERR, "write"); } -- cgit 1.4.1 =1'>log tree commit diff
path: root/bin/1sh/test.c (unfollow)
Commit message (Collapse)Author
2020-07-10Add The Broken KingdomsJune McEnroe
2020-07-08Add facebook and twitter to title user-agentJune McEnroe
This fixes fetching tweets again! https://github.com/thelounge/thelounge/pull/ 3602 (Intentionally breaking the link so GitHub doesn't add a "referenced this PR" thing?)
2020-06-30Tweak causal.agency for mostly no reasonJune McEnroe
2020-06-30Add Ancillary JusticeJune McEnroe
2020-06-26Add password non-manager to planJune McEnroe
I've had this idea for years...
2020-06-26Tweak TF2 sensitivities once moreJune McEnroe
2020-06-19Add note about litterbox bot useJune McEnroe
2020-06-19Publish "IRC suite"June McEnroe
2020-06-17Add errors to link.shJune McEnroe