summaryrefslogtreecommitdiff
path: root/.local/bin/py/xcolors.py
diff options
context:
space:
mode:
authorDavid Luevano <55825613+luevano@users.noreply.github.com>2020-02-12 02:37:21 -0700
committerDavid Luevano <55825613+luevano@users.noreply.github.com>2020-02-12 02:37:21 -0700
commitb769e5c08da0d6b4e2cc62d9c5b2ea988f78f79c (patch)
treeedb94997a7361c3fd2655e5b72d6417c46554064 /.local/bin/py/xcolors.py
parenta536b007955556c873ec3155cf1df031a426c125 (diff)
Debug for no booting pc
Diffstat (limited to '.local/bin/py/xcolors.py')
-rw-r--r--.local/bin/py/xcolors.py55
1 files changed, 0 insertions, 55 deletions
diff --git a/.local/bin/py/xcolors.py b/.local/bin/py/xcolors.py
deleted file mode 100644
index 39010c7..0000000
--- a/.local/bin/py/xcolors.py
+++ /dev/null
@@ -1,55 +0,0 @@
-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'
-
-
-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)