News for hackers. Stuff that matters.
Re:New startup sells coffee through SSH by zzo38computer on Wednesday May 01, 2024 @05:06PM (#40229414)
Is there an environment variable defined for specifying if you want light or dark colours? If so, then it would help with local programs, and also with remote programs (such as this one) if you add a SendEnv command into the SSH configuration file to specify that SSH should use this environment variable.
Re:New startup sells coffee through SSH by ammar2 on Thursday May 02, 2024 @09:53AM (#40236348)
A little non-portable but there is an xterm escape sequence[1] that gets the user's background color: \e]11;?\a

You might also be able to use the reverse-video[2] escape sequence to get something that works depending on the user's color scheme.

[1] https://stackoverflow.com/a/7767891

[2] https://en.wikipedia.org/wiki/Reverse_video