alacritty: add config with color switching, use as terminal in i3

This commit is contained in:
2020-05-06 22:58:38 +02:00
parent ebd7b86e4c
commit aa1690a445
3 changed files with 35 additions and 1 deletions

15
.config/alacritty/switch_bg.py Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/python3
import os
path = os.path.join(os.getenv('HOME'), '.config/alacritty/alacritty.yml')
with open(path, 'r+') as f:
cfg = f.read()
if " background: '#424242'" in cfg:
cfg = cfg.replace(" background: '#424242'", " background: '#fafafa'")
cfg = cfg.replace(" foreground: '#eeeeee'", " foreground: '#424242'")
else:
cfg = cfg.replace(" background: '#fafafa'", " background: '#424242'")
cfg = cfg.replace(" foreground: '#424242'", " foreground: '#eeeeee'")
f.seek(0)
f.write(cfg)