1
0
mirror of https://github.com/gryf/wmdocklib.git synced 2025-12-19 12:28:10 +01:00

1577060: colour choice at command line is lost

palette is now built using the options passed at command line.
This commit is contained in:
mfrasca
2006-10-14 08:17:14 +00:00
parent e8fbc09fd2
commit 87b09d0229
2 changed files with 29 additions and 23 deletions

View File

@@ -280,25 +280,6 @@ def parseCommandLine(argv):
sys.exit(2)
return d
palette = {
' ': '#208120812081',
'.': '#00000000FFFF',
'o': '#C71BC30BC71B',
'O': '#861782078E38',
'+': '#EFBEF3CEEFBE',
'@': '#618561856185',
'#': '#9E79A2899E79',
'$': '#410341034103',
'o': '#2020b2b2aaaa',
'/': '#2020b2b2aaaa',
'-': '#707070707070',
'|': '#2020b2b2aaaa',
'I': '#707070707070',
'_': '#000000000000',
'%': '#2081B2CAAEBA',
}
background = \
[' ...............................................................................................',
' .///..___..ooo..___..___......|.I..............................................................',
@@ -367,7 +348,6 @@ background = \
]
def main():
wmdocklib.initPixmap(background, palette=palette)
config = parseCommandLine(sys.argv)
procStat = config.get('procstat', defaultProcStat)
if not os.access(procStat, os.R_OK):
@@ -386,6 +366,27 @@ def main():
except IndexError:
programName = ''
sys.argv[0] = programName
palette = {
' ': '#208120812081',
'.': '#00000000FFFF',
'o': '#C71BC30BC71B',
'O': '#861782078E38',
'+': '#EFBEF3CEEFBE',
'@': '#618561856185',
'#': '#9E79A2899E79',
'$': '#410341034103',
'o': '#2020b2b2aaaa',
}
#palette['o'] = config.get('indicator', '#2020b2b2aaaa')
palette['/'] = config.get('barfgcolor', '#2020b2b2aaaa')
palette['-'] = config.get('barbgcolor', '#707070707070')
palette['|'] = config.get('graphforeground', '#2020b2b2aaaa')
palette['I'] = config.get('graphbackground', '#707070707070')
palette['_'] = config.get('background', '#000000000000')
palette['%'] = config.get('foreground', '#2081B2CAAEBA')
wmdocklib.initPixmap(background, palette=palette)
wmdocklib.openXwindow(sys.argv, width, height)
pywmsysmon = PywmSysMon(procMeminfo, procStat, ignoreNice, updateDelay)
pywmsysmon.mainLoop()