-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell-colors.py
More file actions
39 lines (31 loc) · 1.36 KB
/
shell-colors.py
File metadata and controls
39 lines (31 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3
#[x-cmds]: UPDATE
"""Show the foreground and background colors
from the current shell color scheme."""
from xulbux import FormatCodes
SHELL_COLORS = {
"Black": ["black", "br:black", "br:white|bg:black", "br:white|bg:br:black"],
"White": ["white", "br:white", "black|bg:white", "black|bg:br:white"],
"Red": ["red", "br:red", "black|bg:red", "black|bg:br:red"],
"Yellow": ["yellow", "br:yellow", "black|bg:yellow", "black|bg:br:yellow"],
"Green": ["green", "br:green", "black|bg:green", "black|bg:br:green"],
"Cyan": ["cyan", "br:cyan", "black|bg:cyan", "black|bg:br:cyan"],
"Blue": ["blue", "br:blue", "black|bg:blue", "black|bg:br:blue"],
"Magenta": ["magenta", "br:magenta", "black|bg:magenta", "black|bg:br:magenta"],
}
def show_shell_colors():
print()
for format_codes in SHELL_COLORS.values():
FormatCodes.print(f"[{format_codes[0]}](Aa) ", end="")
print(" ", end="")
for format_codes in SHELL_COLORS.values():
FormatCodes.print(f"[{format_codes[2]}]( Aa )", end="")
print()
for format_codes in SHELL_COLORS.values():
FormatCodes.print(f"[{format_codes[1]}](Aa) ", end="")
print(" ", end="")
for format_codes in SHELL_COLORS.values():
FormatCodes.print(f"[{format_codes[3]}]( Aa )", end="")
print("\n")
if __name__ == "__main__":
show_shell_colors()