Preferences

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.

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

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal