theme.sh
theme.sh copied to clipboard
Add $DEVOUT to bypass /dev/tty in scripts
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.