- commit
- d271ac3429f10a91feb772d23ce84ad6bf1260e8
- parent
- fde244a9d8cefb2b807c2807beebc4a7282fb98d
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2019-11-15 08:58
keep palette after theme change use *these* colors, not theme colors for palette
Diffstat
| M | wal/__main__.py | 2 | +- |
| M | wal/term.py | 8 | +++++--- |
2 files changed, 6 insertions, 4 deletions
diff --git a/wal/__main__.py b/wal/__main__.py
@@ -28,7 +28,7 @@ def main(): 28 28 s = scheme.colors2scheme(colors) 29 29 30 30 print(';'.join(s))31 -1 term.palette()-1 31 term.palette(s) 32 32 term.apply(s) 33 33 34 34
diff --git a/wal/term.py b/wal/term.py
@@ -1,5 +1,7 @@ 1 1 import glob 2 2 -1 3 from . import lch -1 4 3 5 4 6 def apply(scheme): 5 7 for path in glob.glob('/dev/pts/[0-9]*'): @@ -10,10 +12,10 @@ def apply(scheme): 10 12 tty.write('\033]%s;%s\033\\' % (10, scheme[15])) 11 13 12 1413 -1 def palette():-1 15 def palette(scheme): 14 16 s = [] 15 17 for i in range(0, 16):16 -1 a = '8;5;%s' % i if i > 7 else i17 -1 s.append('\033[4%sm%s\033[0m' % (a, ' '))-1 18 r, g, b = lch.parse_hex(scheme[i]) -1 19 s.append('\033[48;2;%i;%i;%im \033[0m' % (r, g, b)) 18 20 print(''.join(s[:8])) 19 21 print(''.join(s[8:]))