diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2019-10-09 10:38:33 -0400 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2019-10-09 10:38:33 -0400 |
| commit | 1f92a795880e9db158713e520c8fcbcaff301c9c (patch) | |
| tree | fb43cd2976070f45494d4f4a02d76e8e9720287c | |
| parent | 08e4930a522e821c96dbd2da173df2800aa488f5 (diff) | |
Debug
| -rwxr-xr-x | src/i3-colors.py | 4 | ||||
| -rw-r--r-- | tests/test-apply-no-vars.out | 2 | ||||
| -rw-r--r-- | tests/test-apply-no-vars.sh | 2 | ||||
| -rw-r--r-- | tests/test-apply-with-vars.out | 2 | ||||
| -rw-r--r-- | tests/test-apply-with-vars.sh | 2 |
5 files changed, 8 insertions, 4 deletions
diff --git a/src/i3-colors.py b/src/i3-colors.py index e206a3d..a544c01 100755 --- a/src/i3-colors.py +++ b/src/i3-colors.py @@ -8,6 +8,8 @@ def apply(args): exit(1) loaded_theme=theme.load(args.theme_path) config_file=os.environ["HOME"]+"/.config/i3/config" + if args.config_path: + config_file=args.config_path if not(args.dry): config.apply(config_file,loaded_theme) for meta_key,meta_value in loaded_theme["meta"].items(): @@ -45,6 +47,8 @@ if __name__ == "__main__": argsApplyParser = argsSubParsers.add_parser("apply") argsApplyParser.add_argument('theme_path', type=str, nargs='?', help='I3 YAML theme path.') + argsApplyParser.add_argument('config_path', type=str, nargs='?', + help='I3 config file path.') argsApplyParser.add_argument('-r', '--restart' ,action='store_true', help='Restart i3 after applying theme.') argsApplyParser.add_argument('-d', '--dry' ,action='store_true', help='Do not apply theme, just print config file.') argsApplyParser.set_defaults(func=apply) diff --git a/tests/test-apply-no-vars.out b/tests/test-apply-no-vars.out index ef73c72..bcd7f3a 100644 --- a/tests/test-apply-no-vars.out +++ b/tests/test-apply-no-vars.out @@ -287,7 +287,7 @@ bar { position top font pango:DejaVu Sans Mono 14 status_command i3status -c ~/.config/i3/i3status.conf -separator_symbol "|" + separator_symbol "|" colors { active_workspace #414141 #2d2d2d #ffffff background #2d2d2d diff --git a/tests/test-apply-no-vars.sh b/tests/test-apply-no-vars.sh index 9633f05..34ba9b8 100644 --- a/tests/test-apply-no-vars.sh +++ b/tests/test-apply-no-vars.sh @@ -4,5 +4,5 @@ wai=$(dirname $(readlink -f $0)) source "${wai}/include.sh" ##### Test apply on theme with no variables -$exec apply -d ${data}/google +$exec apply -d ${data}/google ${data}/config diff --git a/tests/test-apply-with-vars.out b/tests/test-apply-with-vars.out index 9d121e0..b741ee5 100644 --- a/tests/test-apply-with-vars.out +++ b/tests/test-apply-with-vars.out @@ -287,7 +287,7 @@ bar { position top font pango:DejaVu Sans Mono 14 status_command i3status -c ~/.config/i3/i3status.conf -separator_symbol "|" + separator_symbol "|" colors { separator #AAAAAA background #1f2326 diff --git a/tests/test-apply-with-vars.sh b/tests/test-apply-with-vars.sh index 9aa59c7..87ac3c4 100644 --- a/tests/test-apply-with-vars.sh +++ b/tests/test-apply-with-vars.sh @@ -4,4 +4,4 @@ wai=$(dirname $(readlink -f $0)) source "${wai}/include.sh" ##### Test apply on theme with variables -$exec apply -d ${data}/seti +$exec apply -d ${data}/seti ${data}/config |
