do not overwrite the top 8 colors of the palette with black
This commit is contained in:
parent
74e2cf1ccb
commit
bf85eaf05f
|
@ -47,7 +47,7 @@ URWID_16_NAMES = [
|
||||||
URWID16 = {}
|
URWID16 = {}
|
||||||
URWID256 = {}
|
URWID256 = {}
|
||||||
|
|
||||||
PALETTE = bytearray(16*3)
|
PALETTE = bytearray(8*3)
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
0: ("bg", (0x00, 0x00, 0x00)),
|
0: ("bg", (0x00, 0x00, 0x00)),
|
||||||
|
|
|
@ -44,7 +44,10 @@ UO_R, UO_G, UO_B = 0xe9, 0x54, 0x20
|
||||||
def setup_ubuntu_orange(pal, additional_opts):
|
def setup_ubuntu_orange(pal, additional_opts):
|
||||||
"""Overwrite color 4 (usually "dark blue") to Ubuntu orange."""
|
"""Overwrite color 4 (usually "dark blue") to Ubuntu orange."""
|
||||||
if is_linux_tty():
|
if is_linux_tty():
|
||||||
fcntl.ioctl(sys.stdout.fileno(), PIO_CMAP, pal)
|
curpal = bytearray(16*3)
|
||||||
|
fcntl.ioctl(sys.stdout.fileno(), GIO_CMAP, curpal)
|
||||||
|
curpal[:8] = pal
|
||||||
|
fcntl.ioctl(sys.stdout.fileno(), PIO_CMAP, curpal)
|
||||||
elif os.environ['TERM'] == 'fbterm':
|
elif os.environ['TERM'] == 'fbterm':
|
||||||
print('\033[3;4;%i;%i;%i}' % (UO_R, UO_G, UO_B), flush=True)
|
print('\033[3;4;%i;%i;%i}' % (UO_R, UO_G, UO_B), flush=True)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue