From 18c7598503e76388b97eff5ee92d81274c342b81 Mon Sep 17 00:00:00 2001 From: Pokey Rule Date: Thu, 2 Sep 2021 17:34:19 +0100 Subject: [PATCH] Add a bunch of new hats (#71) * Add many new hats * disable some shapes by default * Tweak docs --- docs/customization.md | 14 ++++++++++---- src/csv_overrides.py | 2 +- src/marks/mark.py | 12 +++++++----- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/docs/customization.md b/docs/customization.md index d8976590..97ab6bb6 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -12,7 +12,9 @@ improve customization. The spoken forms for actions, scope types, colors, etc can be customized using the csvs found in the `cursorless-settings` subdirectory of your user folder. On Linux and Mac, the directory is `~/.talon/user/cursorless-settings`. On -Windows, it is `%AppData%\Talon\user\cursorless-settings`. The directory location can be customized using the `user.cursorless_settings_directory` Talon setting. If the path is relative, it will be taken relative to your Talon user directory. +Windows, it is `%AppData%\Talon\user\cursorless-settings`. + +The directory location can be customized using the `user.cursorless_settings_directory` Talon setting. If the path is relative, it will be taken relative to your Talon user directory. Note that these csv's: @@ -22,6 +24,10 @@ Note that these csv's: - ignore any leading / trailing whitespace on spoken forms and cursorless identifiers +If the spoken form begins with a `-`, it will be disabled. Please do not remove +these lines, because that will trigger cursorless to add them back on next +reload, as cursorless uses these lines to track disabled spoken forms. + ### Changing a spoken form Simply modify the spoken form in the first column of any of the csvs in the @@ -34,6 +40,6 @@ When new actions, scope types, etc are added, Cursorless will detect that they'r ### Removing a term If you'd like to remove an action, scope type, etc, you can simply set the -spoken form in the first column to `-`. Please don't delete any lines, as that -will trigger cursorless to automatically add the spoken form back on talon -restart. +spoken form in the first column to any thing starting with `-`. Please don't +delete any lines, as that will trigger cursorless to automatically add the +spoken form back on talon restart. diff --git a/src/csv_overrides.py b/src/csv_overrides.py index d66779e5..9efd06eb 100644 --- a/src/csv_overrides.py +++ b/src/csv_overrides.py @@ -57,7 +57,7 @@ def on_watch(path, flags): def is_removed(value: str): - return value == "-" + return value.startswith("-") def update_dicts(default_values: dict[str, dict], current_values: dict): diff --git a/src/marks/mark.py b/src/marks/mark.py index e040a61d..0e9040e7 100644 --- a/src/marks/mark.py +++ b/src/marks/mark.py @@ -20,12 +20,15 @@ "plum": "purple", } -# TODO: Re-add to settings csv hat_shapes = { - "splat": "star", + "splat": "fourPointStar", "fox": "chevron", + "-wing": "threePointStar", + "-hole": "hole", + "-frame": "frame", + "-curve": "curve", + "-stare": "eye", } -ctx.lists[get_cursorless_list_name("hat_shape")] = hat_shapes @mod.capture( @@ -105,8 +108,7 @@ def on_ready(): "hat_styles", { "hat_color": hat_colors, - # TODO: Re-add to settings csv - # "hat_shape": hat_shapes, + "hat_shape": hat_shapes, }, )