mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-20 17:47:44 +02:00
colors: Limit palette width.
This commit is contained in:
parent
80449d9439
commit
ff2ad9bd35
@ -94,8 +94,6 @@ def get_backend(backend):
|
|||||||
|
|
||||||
def palette():
|
def palette():
|
||||||
"""Generate a palette from the colors."""
|
"""Generate a palette from the colors."""
|
||||||
col_width = " " * (os.get_terminal_size().columns // 8)
|
|
||||||
|
|
||||||
for i in range(0, 16):
|
for i in range(0, 16):
|
||||||
if i % 8 == 0:
|
if i % 8 == 0:
|
||||||
print()
|
print()
|
||||||
@ -103,7 +101,7 @@ def palette():
|
|||||||
if i > 7:
|
if i > 7:
|
||||||
i = "8;5;%s" % i
|
i = "8;5;%s" % i
|
||||||
|
|
||||||
print("\033[4%sm%s\033[0m" % (i, col_width), end="")
|
print("\033[4%sm%s\033[0m" % (i, " " * (80 // 20)), end="")
|
||||||
|
|
||||||
print("\n")
|
print("\n")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user