Simplify the cmake theme, use "scale" instead of adhoc regex
This commit is contained in:
parent
c9eb7a1380
commit
b470c81d01
1 changed files with 4 additions and 21 deletions
|
|
@ -6,7 +6,7 @@ def theme():
|
||||||
# actions performed in green
|
# actions performed in green
|
||||||
performed="green"
|
performed="green"
|
||||||
|
|
||||||
th = [
|
return [
|
||||||
# Configure...
|
# Configure...
|
||||||
[ "^--.*works", performed ],
|
[ "^--.*works", performed ],
|
||||||
[ "^--.*done", performed ],
|
[ "^--.*done", performed ],
|
||||||
|
|
@ -33,24 +33,7 @@ def theme():
|
||||||
performing, "normal,normal,bold,normal"],
|
performing, "normal,normal,bold,normal"],
|
||||||
# make errors
|
# make errors
|
||||||
[ "make\[[0-9]+\].*", "yellow"],
|
[ "make\[[0-9]+\].*", "yellow"],
|
||||||
[ "(make: \*\*\* \[.+\] )(.* [0-9]+)", "red", "normal,bold"]
|
[ "(make: \*\*\* \[.+\] )(.* [0-9]+)", "red", "normal,bold"],
|
||||||
|
# progress percentage
|
||||||
|
[ "^\[\s*([0-9]+)%\]","scale" ]
|
||||||
]
|
]
|
||||||
|
|
||||||
# Percentages: rainbow from magenta to red, depending on the number
|
|
||||||
percs={
|
|
||||||
"\s":("magenta","normal"),
|
|
||||||
"1":("magenta","normal"),
|
|
||||||
"2":("magenta","normal"),
|
|
||||||
"3":("blue","normal"),
|
|
||||||
"4":("blue","normal"),
|
|
||||||
"5":("cyan","normal"),
|
|
||||||
"6":("cyan","normal"),
|
|
||||||
"7":("green","normal"),
|
|
||||||
"8":("yellow","normal"),
|
|
||||||
"9":("red","normal"),
|
|
||||||
"10":("red","bold"),
|
|
||||||
}
|
|
||||||
for p in percs:
|
|
||||||
th.append( [ "^(\[)\s*("+p+"[0-9]%)(\])", "black,"+percs[p][0]+",black", percs[p][1] ] )
|
|
||||||
|
|
||||||
return th
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue