Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hSaria committed Jun 5, 2021
1 parent 87bd282 commit bd0b390
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions chromaterm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ def args_init(args=None):
parser.add_argument('--config',
metavar='FILE',
type=str,
help='override location of config file',
default=None)
help='override config file location')

parser.add_argument('--reload',
action='store_true',
Expand All @@ -75,8 +74,7 @@ def args_init(args=None):
parser.add_argument('--rgb',
action='store_true',
help='Use RGB colors (default: detect support, '
'fallback to xterm-256)',
default=None)
'fallback to xterm-256)')

return parser.parse_args(args=args)

Expand Down Expand Up @@ -424,8 +422,9 @@ def main(args=None, max_wait=None, write_default=True):
# Create the signal handler to trigger reloading the config
def reload_config_handler(*_):
config_data = read_file(args.config)

if config_data is not None:
load_rules(config, config_data, rgb=args.rgb)
load_rules(config, config_data, rgb=args.rgb or None)

# Trigger the initial loading
reload_config_handler()
Expand Down

0 comments on commit bd0b390

Please sign in to comment.