-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ikhal] add option to disable mouse, fixes #1289 #1295
Changes from 3 commits
01d8d2e
d3edf74
4b9698d
0ab2595
b61cf4a
e5ff223
56d36c9
5d7daab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ env/ | |
venv/ | ||
.hypothesis/ | ||
.python-version | ||
.dmypy.json | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,12 @@ def multi_calendar_option(f): | |
return d(a(f)) | ||
|
||
|
||
def no_mouse_option(f): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since I had to use this both for |
||
o = click.option('--no-mouse', is_flag=True, | ||
choucavalier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
help='Disable mouse in interactive UI') | ||
return o(f) | ||
|
||
|
||
def _select_one_calendar_callback(ctx, option, calendar): | ||
if isinstance(calendar, tuple): | ||
if len(calendar) > 1: | ||
|
@@ -480,9 +486,12 @@ def isatty(_file): | |
|
||
@cli.command() | ||
@multi_calendar_option | ||
@no_mouse_option | ||
@click.pass_context | ||
def interactive(ctx, include_calendar, exclude_calendar): | ||
def interactive(ctx, include_calendar, exclude_calendar, no_mouse): | ||
choucavalier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
'''Interactive UI. Also launchable via `ikhal`.''' | ||
if no_mouse: | ||
ctx.obj['conf']['default']['enable_mouse'] = False | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm overriding the config value when the |
||
controllers.interactive( | ||
build_collection( | ||
ctx.obj['conf'], | ||
|
@@ -494,10 +503,13 @@ def interactive(ctx, include_calendar, exclude_calendar): | |
@click.command() | ||
@global_options | ||
@multi_calendar_option | ||
@no_mouse_option | ||
@click.pass_context | ||
def interactive_cli(ctx, config, include_calendar, exclude_calendar): | ||
def interactive_cli(ctx, config, include_calendar, exclude_calendar, no_mouse): | ||
choucavalier marked this conversation as resolved.
Show resolved
Hide resolved
|
||
'''Interactive UI. Also launchable via `khal interactive`.''' | ||
prepare_context(ctx, config) | ||
if no_mouse: | ||
ctx.obj['conf']['default']['enable_mouse'] = False | ||
controllers.interactive( | ||
build_collection( | ||
ctx.obj['conf'], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this because I'm using neovim with pylsp-mypy (with the dmypy daemon, which can create this file).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objections on this.
Note that you can include this in
~/.config/git/ignore
and git will ignore the file for all your local repositories.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks, did not know that. Good to know :)