Changed colors to NCS style.
- See https://en.wikipedia.org/wiki/Natural_Color_System.
This commit is contained in:
parent
7d6d9d88eb
commit
4c58d377e2
7 changed files with 35 additions and 37 deletions
|
|
@ -27,14 +27,14 @@
|
|||
│ │
|
||||
│Statuses: │
|
||||
│ (B[m[38;2;255;255;255m[48;2;150;150;150m (B[m[38;2;255;255;255m[48;2;0;0;0m Normal │
|
||||
│ (B[m[38;2;255;255;255m[48;2;0;128;0m (B[m[38;2;255;255;255m[48;2;0;0;0m Ok │
|
||||
│ (B[m[38;2;255;255;255m[48;2;139;0;0m (B[m[38;2;255;255;255m[48;2;0;0;0m Problem │
|
||||
│ (B[m[38;2;255;255;255m[48;2;0;159;107m (B[m[38;2;255;255;255m[48;2;0;0;0m Ok │
|
||||
│ (B[m[38;2;255;255;255m[48;2;196;2;51m (B[m[38;2;255;255;255m[48;2;0;0;0m Problem │
|
||||
│ (B[m[38;2;255;255;255m[48;2;100;100;100m (B[m[38;2;255;255;255m[48;2;0;0;0m Not applicable │
|
||||
│ (B[m[38;2;255;255;255m[48;2;90;90;255m (B[m[38;2;255;255;255m[48;2;0;0;0m Running │
|
||||
│ (B[m[38;2;255;255;255m[48;2;0;135;189m (B[m[38;2;255;255;255m[48;2;0;0;0m Running │
|
||||
│ (B[m[38;2;255;255;255m[48;2;255;211;0m (B[m[38;2;255;255;255m[48;2;0;0;0m Paused │
|
||||
│ (B[m[38;2;255;255;255m[48;2;200;0;200m (B[m[38;2;255;255;255m[48;2;0;0;0m Timed out │
|
||||
│ . Pending │
|
||||
│ (B[m[38;2;255;255;255m[48;2;255;0;0mE(B[m[38;2;255;255;255m[48;2;0;0;0m Error │
|
||||
│ (B[m[38;2;255;255;255m[48;2;196;2;51mE(B[m[38;2;255;255;255m[48;2;0;0;0m Error │
|
||||
│ │
|
||||
│ │
|
||||
│ │
|
||||
|
|
@ -57,4 +57,4 @@
|
|||
│ │
|
||||
│ │
|
||||
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
(B[m[38;2;255;255;255m[48;2;100;100;100m (B[m[38;2;0;255;0m[48;2;100;100;100mh(B[m[38;2;255;255;255m[48;2;100;100;100melp (B[m[38;2;0;255;0m[48;2;100;100;100mq(B[m[38;2;255;255;255m[48;2;100;100;100muit (B[m[38;2;0;255;0m[48;2;100;100;100mtab(B[m[38;2;255;255;255m[48;2;100;100;100m:focus (B[m[38;2;0;255;0m[48;2;100;100;100mt(B[m[38;2;255;255;255m[48;2;100;100;100murn (B[m[38;2;0;255;0m[48;2;100;100;100ml(B[m[38;2;255;255;255m[48;2;100;100;100mog (B[m[38;2;0;255;0m[48;2;100;100;100me(B[m[38;2;255;255;255m[48;2;100;100;100mdit (B[m[38;2;0;255;0m[48;2;100;100;100mn(B[m[38;2;255;255;255m[48;2;100;100;100mext (B[m[38;2;0;255;0m[48;2;100;100;100mp(B[m[38;2;255;255;255m[48;2;100;100;100mause (B[m[38;2;0;255;0m[48;2;100;100;100mo(B[m[38;2;255;255;255m[48;2;100;100;100mrder (B[m[38;2;0;255;0m[48;2;100;100;100mr(B[m[38;2;255;255;255m[48;2;100;100;100mefresh (B[m[38;2;0;255;0m[48;2;100;100;100mf(B[m[38;2;255;255;255m[48;2;100;100;100mullscreen (B[m[38;2;90;90;255m[48;2;100;100;100mrunning(B[m[38;2;255;255;255m[48;2;100;100;100m order:directory (B[m
|
||||
(B[m[38;2;255;255;255m[48;2;100;100;100m (B[m[38;2;0;255;0m[48;2;100;100;100mh(B[m[38;2;255;255;255m[48;2;100;100;100melp (B[m[38;2;0;255;0m[48;2;100;100;100mq(B[m[38;2;255;255;255m[48;2;100;100;100muit (B[m[38;2;0;255;0m[48;2;100;100;100mtab(B[m[38;2;255;255;255m[48;2;100;100;100m:focus (B[m[38;2;0;255;0m[48;2;100;100;100mt(B[m[38;2;255;255;255m[48;2;100;100;100murn (B[m[38;2;0;255;0m[48;2;100;100;100ml(B[m[38;2;255;255;255m[48;2;100;100;100mog (B[m[38;2;0;255;0m[48;2;100;100;100me(B[m[38;2;255;255;255m[48;2;100;100;100mdit (B[m[38;2;0;255;0m[48;2;100;100;100mn(B[m[38;2;255;255;255m[48;2;100;100;100mext (B[m[38;2;0;255;0m[48;2;100;100;100mp(B[m[38;2;255;255;255m[48;2;100;100;100mause (B[m[38;2;0;255;0m[48;2;100;100;100mo(B[m[38;2;255;255;255m[48;2;100;100;100mrder (B[m[38;2;0;255;0m[48;2;100;100;100mr(B[m[38;2;255;255;255m[48;2;100;100;100mefresh (B[m[38;2;0;255;0m[48;2;100;100;100mf(B[m[38;2;255;255;255m[48;2;100;100;100mullscreen (B[m[38;2;0;135;189m[48;2;100;100;100mrunning(B[m[38;2;255;255;255m[48;2;100;100;100m order:directory (B[m
|
||||
|
|
@ -1,18 +1,18 @@
|
|||
(B[m[38;2;90;90;255m[48;2;0;0;0msize:(B[m[38;2;255;255;255m[48;2;0;0;0m 12.0 B(B[m[38;2;100;100;100m[48;2;0;0;0m (12 bytes)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0mpermissions:(B[m[38;2;255;255;255m[48;2;0;0;0m ?rwxr-xr-x(B[m[38;2;100;100;100m[48;2;0;0;0m (755)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0msize:(B[m[38;2;255;255;255m[48;2;0;0;0m 12.0 B(B[m[38;2;100;100;100m[48;2;0;0;0m (12 bytes)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0mpermissions:(B[m[38;2;255;255;255m[48;2;0;0;0m ?rwxr-xr-x(B[m[38;2;100;100;100m[48;2;0;0;0m (755)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0mmodified time:(B[m[38;2;255;255;255m[48;2;0;0;0m Sun Jan 31 23:14:05 2016(B[m[38;2;100;100;100m[48;2;0;0;0m (1454282045 secs)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0mcreation time:(B[m[38;2;255;255;255m[48;2;0;0;0m Sun Jan 31 23:14:05 2016(B[m[38;2;100;100;100m[48;2;0;0;0m (1454282045 secs)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0maccess time:(B[m[38;2;255;255;255m[48;2;0;0;0m Sun Jan 31 23:14:07 2016(B[m[38;2;100;100;100m[48;2;0;0;0m (1454282047 secs)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0mmodified time:(B[m[38;2;255;255;255m[48;2;0;0;0m Sun Jan 31 23:14:05 2016(B[m[38;2;100;100;100m[48;2;0;0;0m (1454282045 secs)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0mcreation time:(B[m[38;2;255;255;255m[48;2;0;0;0m Sun Jan 31 23:14:05 2016(B[m[38;2;100;100;100m[48;2;0;0;0m (1454282045 secs)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0maccess time:(B[m[38;2;255;255;255m[48;2;0;0;0m Sun Jan 31 23:14:07 2016(B[m[38;2;100;100;100m[48;2;0;0;0m (1454282047 secs)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0mowner:(B[m[38;2;255;255;255m[48;2;0;0;0m foo(B[m[38;2;100;100;100m[48;2;0;0;0m (1111 uid)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0mgroup:(B[m[38;2;255;255;255m[48;2;0;0;0m foo(B[m[38;2;100;100;100m[48;2;0;0;0m (1111 gid)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0mowner:(B[m[38;2;255;255;255m[48;2;0;0;0m foo(B[m[38;2;100;100;100m[48;2;0;0;0m (1111 uid)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0mgroup:(B[m[38;2;255;255;255m[48;2;0;0;0m foo(B[m[38;2;100;100;100m[48;2;0;0;0m (1111 gid)(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0mhardlinks:(B[m[38;2;255;255;255m[48;2;0;0;0m 2
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0msymlink:(B[m[38;2;255;255;255m[48;2;0;0;0m no
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0mhardlinks:(B[m[38;2;255;255;255m[48;2;0;0;0m 2
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0msymlink:(B[m[38;2;255;255;255m[48;2;0;0;0m no
|
||||
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0mmd5:(B[m[38;2;255;255;255m[48;2;0;0;0m 28ca2e417cb64ea4e555efe3203642de
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0msha1:(B[m[38;2;255;255;255m[48;2;0;0;0m 8b8c0214f3f0a0d79032d1b44550064964a33a26
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0mmd5:(B[m[38;2;255;255;255m[48;2;0;0;0m 28ca2e417cb64ea4e555efe3203642de
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0msha1:(B[m[38;2;255;255;255m[48;2;0;0;0m 8b8c0214f3f0a0d79032d1b44550064964a33a26
|
||||
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0mmime type:(B[m[38;2;255;255;255m[48;2;0;0;0m text/x-python; charset=us-ascii
|
||||
(B[m[38;2;90;90;255m[48;2;0;0;0mfile type:(B[m[38;2;255;255;255m[48;2;0;0;0m Python script, ASCII text executable (B[m
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0mmime type:(B[m[38;2;255;255;255m[48;2;0;0;0m text/x-python; charset=us-ascii
|
||||
(B[m[38;2;0;135;189m[48;2;0;0;0mfile type:(B[m[38;2;255;255;255m[48;2;0;0;0m Python script, ASCII text executable (B[m
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
(B[m[38;2;0;128;0m[48;2;0;0;0m> def hi():(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;128;0m[48;2;0;0;0m> print("hi")(B[m
|
||||
(B[m[38;2;0;159;107m[48;2;0;0;0m> def hi():(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;159;107m[48;2;0;0;0m> print("hi")(B[m
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
(B[m[38;2;0;128;0m[48;2;0;0;0m> def hi():(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;128;0m[48;2;0;0;0m> print "hi"(B[m
|
||||
(B[m[38;2;0;159;107m[48;2;0;0;0m> def hi():(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;159;107m[48;2;0;0;0m> print "hi"(B[m
|
||||
|
|
@ -196,7 +196,7 @@ def log_filesystem_changed(log, added, removed, modified):
|
|||
termstr.Color.grey_100 if stat == 0 else color)
|
||||
parts = [part(added, "added", termstr.Color.green),
|
||||
part(removed, "removed", termstr.Color.red),
|
||||
part(modified, "modified", termstr.Color.light_blue)]
|
||||
part(modified, "modified", termstr.Color.blue)]
|
||||
log.log_message("Filesystem changed: " + fill3.join(" ", parts))
|
||||
|
||||
|
||||
|
|
@ -892,8 +892,8 @@ class Screen:
|
|||
progress_bar_size):
|
||||
ordering_text = "directory" if is_directory_sort else "type "
|
||||
paused_indicator = (termstr.TermStr("paused ").fg_color(
|
||||
termstr.Color.dark_yellow) if is_paused else termstr.TermStr("running").
|
||||
fg_color(termstr.Color.light_blue))
|
||||
termstr.Color.yellow) if is_paused else termstr.TermStr("running").
|
||||
fg_color(termstr.Color.blue))
|
||||
indicators = " " + paused_indicator + f" order:{ordering_text} "
|
||||
spacing = " " * (width - len(self._STATUS_BAR) - len(indicators))
|
||||
bar = (self._STATUS_BAR[:width - len(indicators)] + spacing +
|
||||
|
|
|
|||
|
|
@ -35,20 +35,18 @@ def _cache_first_result(user_function):
|
|||
|
||||
class Color:
|
||||
|
||||
# https://en.wikipedia.org/wiki/Natural_Color_System
|
||||
black = (0, 0, 0)
|
||||
white = (255, 255, 255)
|
||||
red = (255, 0, 0)
|
||||
green = (0, 128, 0)
|
||||
blue = (0, 0, 255)
|
||||
dark_red = (139, 0, 0)
|
||||
red = (196, 2, 51)
|
||||
green = (0, 159, 107)
|
||||
blue = (0, 135, 189)
|
||||
lime = (0, 255, 0)
|
||||
yellow = (255, 255, 0)
|
||||
dark_yellow = (255, 211, 0)
|
||||
# dark_yellow = (204, 204, 0)
|
||||
yellow = (255, 211, 0)
|
||||
grey_50 = (50, 50, 50)
|
||||
grey_100 = (100, 100, 100)
|
||||
grey_150 = (150, 150, 150)
|
||||
light_blue = (90, 90, 255)
|
||||
light_blue = (173, 216, 230)
|
||||
purple = (200, 0, 200)
|
||||
brown = (150, 75, 0)
|
||||
orange = (255, 153, 0)
|
||||
|
|
|
|||
|
|
@ -54,11 +54,11 @@ class Status(enum.IntEnum):
|
|||
|
||||
|
||||
_STATUS_COLORS = {Status.ok: termstr.Color.green,
|
||||
Status.problem: termstr.Color.dark_red,
|
||||
Status.problem: termstr.Color.red,
|
||||
Status.normal: termstr.Color.grey_150,
|
||||
Status.not_applicable: termstr.Color.grey_100,
|
||||
Status.running: termstr.Color.light_blue,
|
||||
Status.paused: termstr.Color.dark_yellow,
|
||||
Status.running: termstr.Color.blue,
|
||||
Status.paused: termstr.Color.yellow,
|
||||
Status.timed_out: termstr.Color.purple}
|
||||
STATUS_MEANINGS = [
|
||||
(Status.normal, "Normal"), (Status.ok, "Ok"),
|
||||
|
|
@ -250,7 +250,7 @@ def metadata(path):
|
|||
else:
|
||||
name, value = line
|
||||
name = termstr.TermStr(name + ":").fg_color(
|
||||
termstr.Color.light_blue).ljust(16)
|
||||
termstr.Color.blue).ljust(16)
|
||||
text.append(name + fill3.join("", value) + "\n")
|
||||
return (Status.normal, fill3.Text(fill3.join("", text)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue