fix colors
This commit is contained in:
parent
a37ea80076
commit
2a2791448a
39
play zone/colors.sh
Normal file
39
play zone/colors.sh
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo "foreground colors"
|
||||||
|
echo -e "\e[39mDefault"
|
||||||
|
echo -e "\e[30mBlack"
|
||||||
|
echo -e "\e[31mRed"
|
||||||
|
echo -e "\e[32mGreen"
|
||||||
|
echo -e "\e[33mYellow"
|
||||||
|
echo -e "\e[34mBlue"
|
||||||
|
echo -e "\e[35mMagenta"
|
||||||
|
echo -e "\e[36mCyan"
|
||||||
|
echo -e "\e[37mLight gray"
|
||||||
|
echo -e "\e[90mDark gray"
|
||||||
|
echo -e "\e[91mLight red"
|
||||||
|
echo -e "\e[92mLight green"
|
||||||
|
echo -e "\e[93mLight yellow"
|
||||||
|
echo -e "\e[94mLight blue"
|
||||||
|
echo -e "\e[95mLight magenta"
|
||||||
|
echo -e "\e[96mLight cyan"
|
||||||
|
echo -e "\e[97mWhite"
|
||||||
|
|
||||||
|
echo "background colors"
|
||||||
|
echo -e "\e[49mDefault"
|
||||||
|
echo -e "\e[40mBlack"
|
||||||
|
echo -e "\e[41mRed"
|
||||||
|
echo -e "\e[42mGreen"
|
||||||
|
echo -e "\e[43mYellow"
|
||||||
|
echo -e "\e[44mBlue"
|
||||||
|
echo -e "\e[45mMagenta"
|
||||||
|
echo -e "\e[46mCyan"
|
||||||
|
echo -e "\e[47mLight gray"
|
||||||
|
echo -e "\e[100mDark gray"
|
||||||
|
echo -e "\e[101mLight red"
|
||||||
|
echo -e "\e[102mLight green"
|
||||||
|
echo -e "\e[103mLight yellow"
|
||||||
|
echo -e "\e[104mLight blue"
|
||||||
|
echo -e "\e[105mLight magenta"
|
||||||
|
echo -e "\e[106mLight cyan"
|
||||||
|
echo -e "\e[107mWhite"
|
||||||
|
|
@ -35,8 +35,8 @@ class driver():
|
|||||||
self.vcsaDevicePath = '/dev/vcsa'
|
self.vcsaDevicePath = '/dev/vcsa'
|
||||||
self.ListSessions = None
|
self.ListSessions = None
|
||||||
self.charmap = {}
|
self.charmap = {}
|
||||||
self.bgColorNames = {0: _('black'), 1: _('blue'), 2: _('green'), 3: _('cyan'), 4: _('red'), 5: _('purple'), 6: _('brown/yellow'), 7: _('white')}
|
self.bgColorNames = {0: _('black'), 1: _('blue'), 2: _('green'), 3: _('cyan'), 4: _('red'), 5: _('Magenta'), 6: _('brown/yellow'), 7: _('white')}
|
||||||
self.fgColorNames = {8: _('black'), 9: _('blue'), 10: _('green'), 11: _('cyan'), 12: _('red'), 13: _('purple'), 14: _('brown/yellow'), 15: _('white')}
|
self.fgColorNames = {0: _('Black'), 1: _('Blue'), 2: _('Green'), 3: _('Cyan'), 4: _('Red'), 5: _('Magenta'), 6: _('brown/yellow'), 7: _('Light gray'), 8: _('Dark gray'), 9: _('Light blue'), 10: ('Light green'), 11: _('Light cyan'), 12: _('Light red'), 13: _('Light magenta'), 14: _('Light yellow'), 15: _('White')}
|
||||||
self.hichar = None
|
self.hichar = None
|
||||||
def initialize(self, environment):
|
def initialize(self, environment):
|
||||||
self.env = environment
|
self.env = environment
|
||||||
@ -222,11 +222,11 @@ class driver():
|
|||||||
ink = attr & 0x0F
|
ink = attr & 0x0F
|
||||||
paper = (attr>>4) & 0x0F
|
paper = (attr>>4) & 0x0F
|
||||||
blink = 0
|
blink = 0
|
||||||
#if attr & 1:
|
if attr & 1:
|
||||||
# blink = 1
|
blink = 1
|
||||||
bold = 0
|
bold = 0
|
||||||
#if attr & 16:
|
if attr & 16:
|
||||||
# bold = 1
|
bold = 1
|
||||||
#if (ink != 7) or (paper != 0):
|
#if (ink != 7) or (paper != 0):
|
||||||
# print(ink,paper)
|
# print(ink,paper)
|
||||||
if sh & self.hichar:
|
if sh & self.hichar:
|
||||||
@ -240,15 +240,15 @@ class driver():
|
|||||||
allAttrib += lineAttrib
|
allAttrib += lineAttrib
|
||||||
return str(allText), allAttrib
|
return str(allText), allAttrib
|
||||||
def getFenrirBGColor(self, attribute):
|
def getFenrirBGColor(self, attribute):
|
||||||
|
print(attribute[2])
|
||||||
try:
|
try:
|
||||||
return self.bgColorNames[attribute[2]]
|
return self.bgColorNames[attribute[2]]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
|
||||||
return ''
|
return ''
|
||||||
def getFenrirFGColor(self, attribute):
|
def getFenrirFGColor(self, attribute):
|
||||||
try:
|
try:
|
||||||
return self.fgColorNames[attribute[1]]
|
return self.fgColorNames[attribute[1]]
|
||||||
except:
|
except Exception as e:
|
||||||
return ''
|
return ''
|
||||||
def getFenrirUnderline(self, attribute):
|
def getFenrirUnderline(self, attribute):
|
||||||
if attribute[5] == 1:
|
if attribute[5] == 1:
|
||||||
@ -263,9 +263,9 @@ class driver():
|
|||||||
return _('blink')
|
return _('blink')
|
||||||
return ''
|
return ''
|
||||||
def getFenrirFont(self, attribute):
|
def getFenrirFont(self, attribute):
|
||||||
return _('System Font')
|
return _('')
|
||||||
def getFenrirFontSize(self, attribute):
|
def getFenrirFontSize(self, attribute):
|
||||||
return _('System Font Size')
|
return _('')
|
||||||
def update(self, trigger='onUpdate'):
|
def update(self, trigger='onUpdate'):
|
||||||
if trigger == 'onInput': # no need for an update on input for VCSA
|
if trigger == 'onInput': # no need for an update on input for VCSA
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user