Add kitty color converter script

master
Oystein Kristoffer Tveit 2021-06-28 12:48:03 +02:00
parent 8e137e971d
commit a6a082fb61
1 changed files with 18 additions and 0 deletions

18
scripts/kittyColorConverter.py Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env python3
# Source: https://gist.github.com/xdrie/aabe3b7507683001baf7762df005890b
# Usage example:
# ./kittyColorConverter.py < xres_colors.txt >> ~/.config/kitty/kitty.conf
from sys import stdin, stdout
import re
in_conf = stdin.read()
text = in_conf
text = re.sub('!', '#', text)
text = re.sub('\*.', '', text)
text = re.sub(':', '', text)
stdout.write(text)