[st][PATCH] externalpipe and externalpipein
This patch must be applied on the externalpipe patch. It adds the function externalpipein to redirect the standard output of the external command to the slave size of the pty, that is, as if the external program had been manually executed on the terminal. It can be used to send desired escape sequences to the terminal with a shortcut. I created the patch to make use of the dynamic-colors program (https://github.com/sos4nt/dynamic-colors) that uses the OSC escape sequences to change the colors of the terminal. The program keeps the last colorscheme selected in a file, so you can use it to select the colorscheme for all newly opened terminals from that moment on. If you want to change the color of the background and foreground independently from the palette, you have to merge in the patch for the OSC escape sequences 10, 11, and 12. This patch includes the changes of the externalpipe sigaction patch to prevent reseting the signal handler for SIGCHLD when the proces of the external command exits.
This commit is contained in:
parent
5ad2174cf9
commit
b71d9f6669
5 changed files with 59 additions and 14 deletions
|
|
@ -68,12 +68,23 @@
|
|||
*/
|
||||
#define EXTERNALPIPE_PATCH 0
|
||||
|
||||
/* This patch prevents the reset of the signal handler set on SIGCHILD, when
|
||||
* the forked process that executes the external process exits.
|
||||
/* This patch improves and extends the externalpipe patch in two ways:
|
||||
* - it prevents the reset of the signal handler set on SIGCHILD, when
|
||||
* the forked process that executes the external process exits and
|
||||
* - it adds the externalpipein function to redirect the standard output
|
||||
* of the external command to the slave size of the pty, that is, as if
|
||||
* the external program had been manually executed on the terminal
|
||||
*
|
||||
* It can be used to send desired escape sequences to the terminal with a
|
||||
* keyboard shortcut. The patch was created to make use of the dynamic-colors
|
||||
* tool that uses the OSC escape sequences to change the colors of the terminal.
|
||||
*
|
||||
* This patch depends on EXTERNALPIPE_PATCH being enabled.
|
||||
* https://lists.suckless.org/hackers/2004/17216.html
|
||||
*
|
||||
* https://github.com/sos4nt/dynamic-colors
|
||||
* https://lists.suckless.org/hackers/2004/17218.html
|
||||
*/
|
||||
#define EXTERNALPIPE_SIGACTION_PATCH 0
|
||||
#define EXTERNALPIPEIN_PATCH 0
|
||||
|
||||
/* This patch allows command line applications to use all the fancy key combinations
|
||||
* that are available to GUI applications.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue