From c508398d4de79158e4ea0461fc3036f8cfbbf9df Mon Sep 17 00:00:00 2001 From: David Luevano <55825613+luevano@users.noreply.github.com> Date: Fri, 14 Feb 2020 14:39:09 -0700 Subject: Shebang exploration --- .local/bin/pys/xcolors.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) mode change 100644 => 100755 .local/bin/pys/xcolors.py (limited to '.local') diff --git a/.local/bin/pys/xcolors.py b/.local/bin/pys/xcolors.py old mode 100644 new mode 100755 index 39010c7..c6ef9f3 --- a/.local/bin/pys/xcolors.py +++ b/.local/bin/pys/xcolors.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python import os HOME=os.environ['HOME'] + '/' @@ -17,7 +18,7 @@ def update_xresources(csname): with open(XRPATH, 'r') as infile: lines = infile.readlines() - with open(file_dir, 'w') as outfile: + with open(file_dir, 'w') as outfile: for i, line in enumerate(lines): if i == 4: nline = line.split('/') @@ -32,19 +33,19 @@ def update_alacritty(csname): """ Updates the ~/.config/alacritty/alacritty.yml file with new color scheme. """ - if csname not in CSLIST: + 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: + with open(file_dir, 'w') as outfile: for i, line in enumerate(lines): if i == 4: nline = line.split('/') @@ -53,3 +54,7 @@ def update_alacritty(csname): outfile.write(nline) else: outfile.write(line) + + +if __name__=="__main__": + print('Test') -- cgit v1.2.3-54-g00ecf