Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add $DEVOUT to bypass /dev/tty in scripts #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

step-
Copy link

@step- step- commented Aug 17, 2022

This patch adds an environment variable that, when set = 1, makes
theme.sh write color codes to /dev/stdout instead of /dev/tty.

APPLICATION

With st terminal and this patch
https://lists.suckless.org/hackers/2004/17218.html

it becomes possible to run a script whose stdout is directly
connected to the terminal's slave pty. Such script can run
theme.sh to change terminal colors but for it to work theme.sh
must write color codes to its stdout (the slave pty) instead of
/dev/tty, which isn't connected to the terminal.

This patch adds an environment variable that, when set = 1, makes
theme.sh write color codes to /dev/stdout instead of /dev/tty.

APPLICATION

With st terminal and this patch
https://lists.suckless.org/hackers/2004/17218.html

it becomes possible to run a script whose stdout is directly
connected to the terminal's slave pty. Such script can run
theme.sh to change terminal colors but for it to work theme.sh
must write color codes to its stdout (the slave pty) instead of
/dev/tty, which isn't connected to the terminal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant