This repository has been archived on 2025-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/scripts/kittyColorConverter.py
2021-06-28 12:48:03 +02:00

19 lines
381 B
Python
Executable File

#!/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)