Using the statistics module wasn't worth it, because of the time needed for import.
This commit is contained in:
parent
d03e4bd0fe
commit
c00d5bea36
1 changed files with 1 additions and 2 deletions
3
vigil
3
vigil
|
|
@ -61,7 +61,6 @@ import os
|
|||
import pickle
|
||||
import shutil
|
||||
import signal
|
||||
import statistics
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
|
@ -235,7 +234,7 @@ class Entry(collections.UserList):
|
|||
result_selected.status, None)
|
||||
fg_color = (termstr.Color.white
|
||||
if (status_color is None
|
||||
or statistics.mean(status_color) < (255 / 2))
|
||||
or (sum(status_color) / 3) < (255 / 2))
|
||||
else termstr.Color.black)
|
||||
return fill3.Text(termstr.TermStr("●", termstr.CharStyle(
|
||||
fg_color=fg_color, bg_color=status_color)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue