aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/config.py (renamed from src/parser.py)0
-rwxr-xr-xsrc/i3-theme.py12
-rw-r--r--src/theme.py1
3 files changed, 8 insertions, 5 deletions
diff --git a/src/parser.py b/src/config.py
index fdee9fc..fdee9fc 100755
--- a/src/parser.py
+++ b/src/config.py
diff --git a/src/i3-theme.py b/src/i3-theme.py
index fa31b1d..1e367b5 100755
--- a/src/i3-theme.py
+++ b/src/i3-theme.py
@@ -1,9 +1,13 @@
#!/usr/bin/python
-import parser, theme, os, argparse, subprocess
+import config, theme, os, argparse, subprocess
##### Utils Functions #####
-def log(title, content): print("\033[92m{}\033[00m: {}" .format(title,content))
+def log(msg,title=""):
+ if len(title)>0:
+ print("\033[92m{}\033[00m: {}" .format(title,msg))
+ else:
+ print(msg)
###########################
@@ -18,8 +22,8 @@ args = args_parser.parse_args()
##### Apply Theme #####
loaded_theme=theme.load(args.theme_path)
for meta_key,meta_value in loaded_theme["meta"].items():
- log(meta_key.title(),meta_value)
-parser.apply_theme(os.environ["HOME"]+"/.config/i3/config",loaded_theme)
+ log(meta_value,title=meta_key.title())
+config.apply_theme(os.environ["HOME"]+"/.config/i3/config",loaded_theme)
if args.restart:
subprocess.Popen("i3-msg restart".split())
#######################
diff --git a/src/theme.py b/src/theme.py
index 187b8d2..d83b6b5 100644
--- a/src/theme.py
+++ b/src/theme.py
@@ -1,6 +1,5 @@
import yaml,re
-
def configure(theme):
if "colors" in theme:
colors=theme["colors"]