diff options
Diffstat (limited to 'src/i3-theme.py')
| -rwxr-xr-x | src/i3-theme.py | 12 |
1 files changed, 8 insertions, 4 deletions
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()) ####################### |
