Skip to content
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

Add a bunch of new hats #71

Merged
merged 3 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
Expand All @@ -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.
2 changes: 1 addition & 1 deletion src/csv_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
12 changes: 7 additions & 5 deletions src/marks/mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
},
)

Expand Down