Show HN: Lip Gloss is a CSS-like layout library for the terminal for Go (github.com) 45 points by christianrocha 5y ago ↗ HN
[–] geoah 5y ago ↗ Their bubbletea and charms libraries are two of the most amazing go libraries for creating cli apps I have had the pleasure of using.
[–] iudqnolq 5y ago ↗ How can it detect termin background color? [–] jwalton 5y ago ↗ This is the function they are using to detect the background color:https://github.com/muesli/termenv/blob/d1b90ad4a4915162648dd...(There’s a different version of it for Windows.) [–] de6u99er 5y ago ↗ The windows one just returns default black, which is correct in most cases since very few change it to something else.https://github.com/muesli/termenv/blob/d1b90ad4a4915162648dd... [–] bradrn 5y ago ↗ This is not entirely true: Windows Powershell defaulted to a blue background. Though this is admittedly an edge case, as Windows Powershell is now deprecated in favour of Powershell Core (which has a black background) IIRC.
[–] jwalton 5y ago ↗ This is the function they are using to detect the background color:https://github.com/muesli/termenv/blob/d1b90ad4a4915162648dd...(There’s a different version of it for Windows.) [–] de6u99er 5y ago ↗ The windows one just returns default black, which is correct in most cases since very few change it to something else.https://github.com/muesli/termenv/blob/d1b90ad4a4915162648dd... [–] bradrn 5y ago ↗ This is not entirely true: Windows Powershell defaulted to a blue background. Though this is admittedly an edge case, as Windows Powershell is now deprecated in favour of Powershell Core (which has a black background) IIRC.
[–] de6u99er 5y ago ↗ The windows one just returns default black, which is correct in most cases since very few change it to something else.https://github.com/muesli/termenv/blob/d1b90ad4a4915162648dd... [–] bradrn 5y ago ↗ This is not entirely true: Windows Powershell defaulted to a blue background. Though this is admittedly an edge case, as Windows Powershell is now deprecated in favour of Powershell Core (which has a black background) IIRC.
[–] bradrn 5y ago ↗ This is not entirely true: Windows Powershell defaulted to a blue background. Though this is admittedly an edge case, as Windows Powershell is now deprecated in favour of Powershell Core (which has a black background) IIRC.
[–] watersb 5y ago ↗ GNU libtextstyle, part of gettext, includes CSS styling for ANSI terminal emulator text output.For some values of "CSS" and "ANSI".I will dig into a bit when I return to office computer...
6 comments
[ 255 ms ] story [ 812 ms ] threadhttps://github.com/muesli/termenv/blob/d1b90ad4a4915162648dd...
(There’s a different version of it for Windows.)
https://github.com/muesli/termenv/blob/d1b90ad4a4915162648dd...
For some values of "CSS" and "ANSI".
I will dig into a bit when I return to office computer...