summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorDavid Luevano <55825613+luevano@users.noreply.github.com>2020-02-19 00:14:34 -0700
committerDavid Luevano <55825613+luevano@users.noreply.github.com>2020-02-19 00:14:34 -0700
commitd32c6bdd4119edd2c21fa97988fe8830fbe5f7f5 (patch)
tree7b347f762eef38cc3b4658ece3dcf2335e40f8ca /.local
parent4a12f7263131df92ba6b9993f9768e90b1652305 (diff)
Remove xcolors script
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/pys/xcolors.py61
1 files changed, 0 insertions, 61 deletions
diff --git a/.local/bin/pys/xcolors.py b/.local/bin/pys/xcolors.py
deleted file mode 100755
index 7040bc9..0000000
--- a/.local/bin/pys/xcolors.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python
-import os
-
-HOME = os.environ['HOME'] + '/'
-XCDIR = f'{HOME}.config/xcolors/'
-CSLIST = os.listdir(XCDIR)
-XRPATH = f'{HOME}.Xresources'
-ALPATH = f'{HOME}.config/alacritty/alacritty.yml'
-file_dir = f'{HOME}/test'
-
-
-def update_xresources(csname):
- """
- Updates the ~/.Xresources file with new color scheme.
- """
- if csname not in CSLIST:
- return f"{csname} not in {XCDIR}"
-
- with open(XRPATH, 'r') as infile:
- lines = infile.readlines()
-
- with open(file_dir, 'w') as outfile:
- for i, line in enumerate(lines):
- if i == 4:
- nline = line.split('/')
- nline[-1] = csname + '"\n'
- nline = '/'.join(nline)
- outfile.write(nline)
- else:
- outfile.write(line)
-
-
-def update_alacritty(csname):
- """
- Updates the ~/.config/alacritty/alacritty.yml file with new color scheme.
- """
- if csname not in CSLIST:
- return f"{csname} not in {XCDIR}"
-
- with open(ALPATH, 'r') as infile:
- lines = infile.readlines()
-
- for line in lines:
- if 'background' in line:
- print(line)
-
- return None
-
- with open(file_dir, 'w') as outfile:
- for i, line in enumerate(lines):
- if i == 4:
- nline = line.split('/')
- nline[-1] = csname + '"\n'
- nline = '/'.join(nline)
- outfile.write(nline)
- else:
- outfile.write(line)
-
-
-if __name__ == "__main__":
- print('Test')