WingNews logo WingNews
top | new | best | ask | show | jobs
top | item 40236348

(no title)

ammar2 | 1 year ago

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

discuss

order

No comments yet.

powered by hn/api // news.ycombinator.com