propensive / fury-old

A new build tool for JVM languages
Apache License 2.0
413 stars 34 forks source link

create a theme for light terminals #1030

Open propensive opened 4 years ago

propensive commented 4 years ago

A good start would be to take the existing "full color" scheme and invert all the values.

odisseus commented 4 years ago

https://stackoverflow.com/questions/1403772/how-can-i-check-if-a-java-programs-input-output-streams-are-connected-to-a-term https://superuser.com/questions/157563/programmatic-access-to-current-xterm-background-color/406172#406172 https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands

odisseus commented 4 years ago
$ /opt/scala-2.12.8/bin/scala
Welcome to Scala 2.12.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_201).
Type in expressions for evaluation. Or try :help.

scala> import sys.process._
import sys.process._

scala> val esc = 27.toChar
esc: Char = 

scala> val str = s"""${esc}]11;?${esc}\\"""
str: String = 

scala> val str2 = s""""${esc}]11;?${esc}\\""""
str2: String = ""
odisseus commented 4 years ago

http://thrysoee.dk/xtermcontrol/ — it works!

$ xtermcontrol --get-bg
rgb:0000/2b2b/3636
$ xtermcontrol --bg rgb:000
$ xtermcontrol --get-bg
rgb:0000/0000/0000
propensive commented 4 years ago

Does it work everywhere?

odisseus commented 4 years ago

It either works, or prints a nice error message. The problem is that this is an additional program, available in repositories only for some Linux distributions.