Changeset View
Changeset View
Standalone View
Standalone View
head/stand/lua/color.lua
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
color.DEFAULT = 0 | color.DEFAULT = 0 | ||||
color.BRIGHT = 1 | color.BRIGHT = 1 | ||||
color.DIM = 2 | color.DIM = 2 | ||||
function color.isEnabled() | function color.isEnabled() | ||||
local c = loader.getenv("loader_color") | local c = loader.getenv("loader_color") | ||||
if c ~= nil then | if c ~= nil then | ||||
if c:lower() == "no" or c == "0" then | return c:lower() ~= "no" and c ~= "0" | ||||
return false | |||||
end | |||||
end | end | ||||
return not core.isSerialBoot() | return not core.isSerialBoot() | ||||
end | end | ||||
color.disabled = not color.isEnabled() | color.disabled = not color.isEnabled() | ||||
function color.escapefg(color_value) | function color.escapefg(color_value) | ||||
if color.disabled then | if color.disabled then | ||||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |