diff --git a/khal/cli.py b/khal/cli.py index b723c3360..538ff9d4d 100644 --- a/khal/cli.py +++ b/khal/cli.py @@ -97,7 +97,7 @@ def mouse_option(f): o = click.option( '--mouse/--no-mouse', is_flag=True, - default=True, + default=None, help='Disable mouse in interactive UI' ) return o(f) @@ -494,7 +494,8 @@ def isatty(_file): @click.pass_context def interactive(ctx, include_calendar, exclude_calendar, mouse): '''Interactive UI. Also launchable via `ikhal`.''' - ctx.obj['conf']['default']['enable_mouse'] = mouse + if mouse is not None: + ctx.obj['conf']['default']['enable_mouse'] = mouse controllers.interactive( build_collection( ctx.obj['conf'], @@ -511,7 +512,8 @@ def interactive(ctx, include_calendar, exclude_calendar, mouse): def interactive_cli(ctx, config, include_calendar, exclude_calendar, mouse): '''Interactive UI. Also launchable via `khal interactive`.''' prepare_context(ctx, config) - ctx.obj['conf']['default']['enable_mouse'] = mouse + if mouse is not None: + ctx.obj['conf']['default']['enable_mouse'] = mouse controllers.interactive( build_collection( ctx.obj['conf'],