From 5ca2e63ea66095fbe64cdc441f6eec663fb28bd4 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Tue, 8 Oct 2019 21:59:31 -0400 Subject: Add simple integration test framework --- src/i3-colors.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/i3-colors.py b/src/i3-colors.py index f3e5834..9450c9c 100755 --- a/src/i3-colors.py +++ b/src/i3-colors.py @@ -12,7 +12,10 @@ def log(msg,title=""): ##### Apply Theme ##### def apply(args): loaded_theme=theme.load(args.theme_path) - config.apply(os.environ["HOME"]+"/.config/i3/config",loaded_theme) + config_file=os.environ["HOME"]+"/.config/i3/config" + if args.config_path: + config_file=args.config_path + config.apply(config_file,loaded_theme) for meta_key,meta_value in loaded_theme["meta"].items(): log(meta_value,title=meta_key.title()) if args.restart: @@ -36,6 +39,8 @@ argsApplyParser = argsSubParsers.add_parser("apply") argsApplyParser.add_argument('theme_path', type=str, nargs='?', help='I3 YAML theme path.') argsApplyParser.add_argument('-r', '--restart' ,action='store_true', help='Restart i3 after applying theme.') +argsApplyParser.add_argument('config_path', type=str, nargs='?', + help='I3 configuration file.') argsApplyParser.set_defaults(func=apply) argsExtractParser = argsSubParsers.add_parser("extract") -- cgit v1.2.3