History log of /freebsd/stand/lua/color.lua (Results 1 – 25 of 25)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# 9636a145 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line lua tag

Remove /^--\n--\s*\$FreeBSD\$.*$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0
# 3630506b 21-Dec-2020 Toomas Soome <tsoome@FreeBSD.org>

loader: implement framebuffer console

Draw console on efi.
Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list,
vbe set xxx).
autoload font (/boot/fonts) based on resolution and font size

loader: implement framebuffer console

Draw console on efi.
Add vbe framebuffer for BIOS loader (vbe off, vbe on, vbe list,
vbe set xxx).
autoload font (/boot/fonts) based on resolution and font size.
Add command loadfont (set font by file) and
variable screen.font (set font by size). Pass loaded font to kernel.

Export variables:
screen.height
screen.width
screen.depth

Add gfx primitives to draw the screen and put png image on the screen.
Rework menu draw to iterate list of consoles to enamble device specific
output.

Probably something else I forgot...

Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D27420

show more ...


Revision tags: release/12.2.0, release/11.4.0, release/12.1.0
# 1ce57df2 21-Oct-2019 Kyle Evans <kevans@FreeBSD.org>

lualoader: fix setting of loader_color=NO in loader.conf(5)

Previously color.disabled would be calculated at color module load time,
then never touched again. We can detect serial boots beyond just

lualoader: fix setting of loader_color=NO in loader.conf(5)

Previously color.disabled would be calculated at color module load time,
then never touched again. We can detect serial boots beyond just what we're
told by loader.conf(5) so this works out in many cases, but we must
re-evaluate the situation after the config is loaded to make sure we're not
supposed to be forcing it enabled/disabled.

Discovered while trying to test r353872.

show more ...


# a6cf4be0 21-Oct-2019 Kyle Evans <kevans@FreeBSD.org>

lualoader: don't botch disabling of color

When colors are disabled, color.escape{fg,bg} would return the passed in
color rather than the proper ANSI sequence for the color.
color.escape{fg,bg} would

lualoader: don't botch disabling of color

When colors are disabled, color.escape{fg,bg} would return the passed in
color rather than the proper ANSI sequence for the color.
color.escape{fg,bg} would be wrong.

Instead return '', as the associated reset* functions will also return ''.
This should get rid of the funky '2' and '4' in the kernel selector if
you're booting serial.

Reported by: npn

show more ...


# 668ee101 26-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r352587 through r352763.


# 6dd078df 22-Sep-2019 Toomas Soome <tsoome@FreeBSD.org>

loader_lua: lua color changes should end with reset

The color change should have reset sequence, not switch to white.


# f05b9584 21-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r352537 through r352586.


# bb7b569d 20-Sep-2019 Kyle Evans <kevans@FreeBSD.org>

loader: Respect loader_color=YES for serial consoles

It's not uncommon these days for the terminals attached to serial consoles
to support ANSI escape sequences. However, we assume escape sequences

loader: Respect loader_color=YES for serial consoles

It's not uncommon these days for the terminals attached to serial consoles
to support ANSI escape sequences. However, we assume escape sequences may
break some serial consoles and default to not using them when boot_serial or
boot_multicons (or if console contains "comconsole" in the forth loader) for
broader compatibility. We also have loader_color which can be explicitly set
to "NO" to disable the use of ANSI escape sequences.

The problem is that loader_color=YES gets ignored when boot_serial=YES or
boot_multicons=YES (or when console contains "comconsole" in the forth
loader).

To fix, the existing default behavior remains unchanged when loader_color is
unset, loader_color=NO explicitly disables the use of ANSI escape sequences
still, and the change is that loader_color=YES can now be used to explicitly
allow ANSI escapes when a serial console is enabled.

Submitted by: Ryan Moeller <ryan@ixsystems.com>
Reviewed by: tsoome (forth), kevans (lua)
MFC after: 1 week
Sponsored by: iXsystems, Inc. (Ryan)
Differential Revision: https://reviews.freebsd.org/D21732

show more ...


Revision tags: release/11.3.0, release/12.0.0, release/11.2.0
# 5d279164 12-Jun-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: More black-on-white fixes

To recap the problem: with a black-on-white xterm, the menu draws terribly.
Ideally, we would try our best for a white-on-black context for the menu
since graphi

lualoader: More black-on-white fixes

To recap the problem: with a black-on-white xterm, the menu draws terribly.
Ideally, we would try our best for a white-on-black context for the menu
since graphics and whatnot might not be tested for other setups and there's
no reasonable way to sample the terminal at this point for the used color
scheme.

This commit attempts to address that further in two ways:
- Instead of issuing CSI bg/fg resets (CSI 39m and CSI 49m respectively for
"default"), issue CSI bg/fg escape sequences for our expected color scheme
- Reset to *our* default color scheme before we even attempt to load the
local module, so that we personally don't have any earlier text with the
console default color scheme.

Reported by: emaste (again)

show more ...


# 8ce1744f 21-Mar-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Clear up some possible naming confusion

In the original lualoader project, 'escapef' and 'escapeb' were chosen for
'escape fg' and 'escape bg'. We've carried on this naming convention, an

lualoader: Clear up some possible naming confusion

In the original lualoader project, 'escapef' and 'escapeb' were chosen for
'escape fg' and 'escape bg'. We've carried on this naming convention, and as
our use of attributes grow the likeliness of 'escapeb'/'resetb' being
confused upon glance for 'escape bold'/'reset bold' increases.

Fix this by renaming these four functions to {escape,reset}{fg,bg} rather
than {escape,reset}{f,b} for clarity.

Reported by: dteske

show more ...


# 3224bb3f 20-Mar-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Use less atomic options for resetting colors/attributes

Noted by dteske:

CSI 1m ... CSI 22m
CSI 2m ... CSI 22m
CSI 4m ... CSI 24m
CSI 5m ... CSI 25m
CSI 7m ... CSI 27m
CSI 8m ... CSI 28m

lualoader: Use less atomic options for resetting colors/attributes

Noted by dteske:

CSI 1m ... CSI 22m
CSI 2m ... CSI 22m
CSI 4m ... CSI 24m
CSI 5m ... CSI 25m
CSI 7m ... CSI 27m
CSI 8m ... CSI 28m
CSI (30-37)m ... CSI 39m
CSI (40-47)m ... CSI 49m

- Provide resetf/resetb to match escapef/escapeb
- Use CSI 22m to undo a bold

This is a more reasonable approach than what was previously taken.

Reported by: dteske

show more ...


# 4a034bad 20-Mar-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Reset attributes and color scheme with color.highlight()

Previously, we sent a CSI 0m sequence to reset attributes, which also reset
the color scheme if the terminal defaults didn't match

lualoader: Reset attributes and color scheme with color.highlight()

Previously, we sent a CSI 0m sequence to reset attributes, which also reset
the color scheme if the terminal defaults didn't match what we're expecting.
Go all-in and reset the color scheme, too, just in case.

Reported by: emaste

show more ...


# 85efc91a 19-Mar-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Setup default color scheme if we're using colors

The console may have been set for different colors before lualoader kicks
in; notably, a black-on-white color scheme is not necessarily wh

lualoader: Setup default color scheme if we're using colors

The console may have been set for different colors before lualoader kicks
in; notably, a black-on-white color scheme is not necessarily what we're
expecting.

While here, make color.default() a composition of color.escape() instead of
rewriting the escape sequence to make it more obvious what it's achieving: a
white-on-black color scheme with no attributes set.

Reported by: emaste, whose eyes may rest easily

show more ...


# 2bb86aef 27-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Convert instances of KEYSTR_ESCAPE .. "[" -> KEYSTR_CSI


# d5b2439e 27-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Replace instances of \027 with KEYSTR_ESCAPE

With exception to drawing bits, which should probably be kept as-is to not
make a mess out of things.

Reported by: rpokala (a while ago)


# 04af4229 26-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: More argument name expansion, part 2

screen also has some instances, but it also has other cleanup to go with it.
Because of this, I will be committing the screen changes separately.


# 72e39d71 23-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

Add SPDX tags to lua files


# 9f71d421 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Drop excessive parenthesizing

This was also a convenience convention (for me) that is not very lua-tic.
Drop it.

I've maintained some parentheses where I'd prefer them, for example,
'if

lualoader: Drop excessive parenthesizing

This was also a convenience convention (for me) that is not very lua-tic.
Drop it.

I've maintained some parentheses where I'd prefer them, for example,
'if x or y or (z and w) then', but these situations are far and few between.

show more ...


# aedd6be5 21-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

lualoader: Drop terminating semicolons

This was previously chosen out of convenience, as we had a mixed style and
needed to be consistent. I started learning Lua on Friday, so I switched
everything

lualoader: Drop terminating semicolons

This was previously chosen out of convenience, as we had a mixed style and
needed to be consistent. I started learning Lua on Friday, so I switched
everything over. It is not a very lua-nic convention, though, so drop it.

Excessive parenthesizing around conditionals is next on the chopping block.

show more ...


# b5746545 20-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Consistently organize modules

We follow pretty closely the following structure of a module:

1. Copyright notice
2. Module requires
3. Module local declarations
4. Module local definition

stand/lua: Consistently organize modules

We follow pretty closely the following structure of a module:

1. Copyright notice
2. Module requires
3. Module local declarations
4. Module local definitions
5. Module exports
6. return

Re-organize the one-offs (config/drawer) and denote the start of module
exports with a comment.

show more ...


# 1f5696c7 19-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Round up some more style.lua(9) concerns


# b140d14b 19-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Rename bootserial for clarity


# 24a1bd54 17-Feb-2018 Kyle Evans <kevans@FreeBSD.org>

stand/lua: Style pass

These are the style points that I'd like to try and maintain in our lua
scripts:
- Parentheses around conditionals
- Trailing semicolons, except on block terminators
- s:method

stand/lua: Style pass

These are the style points that I'd like to try and maintain in our lua
scripts:
- Parentheses around conditionals
- Trailing semicolons, except on block terminators
- s:method(...) instead of string.method(s, ...) where applicable

There's likely more, but that'll get hammered out as we continue.

show more ...


# 088b4f5f 12-Feb-2018 Warner Losh <imp@FreeBSD.org>

Add the lua scripts from the lua-bootloader SoC

These are the .lua files from from Pedro Souza's 2014 Summer of Code
project. Rui Paulo, Pedro Arthur and Wojciech A. Koszek also
contributed.

Obtain

Add the lua scripts from the lua-bootloader SoC

These are the .lua files from from Pedro Souza's 2014 Summer of Code
project. Rui Paulo, Pedro Arthur and Wojciech A. Koszek also
contributed.

Obtained from: https://wiki.freebsd.org/SummerOfCode2014/LuaLoader
Sponsored by: Google Summer of Code

Improve the SoC lua menu code to bring it in line with forth
menu functionality

Submitted by: Zakary Nafziger
Sponsored by: FreeBSD Foundation

Use loader.setenv and loader.unsetenv instead of loader.perform

Convert from include("/boot/foo.lua") to foo = require("foo");
to bring in line with latest lua module conventions.

Enforce a uniform style for the new .lua files:
o hard tab indenation for 8 spaces
o don't have if foo then bar; else bas; end on one line

MFC After: 1 month
Relnotes: yes
Differential Review: https://reviews.freebsd.org/D14295

show more ...