Skip to content

Commit

Permalink
Add a bunch of new hats (#71)
Browse files Browse the repository at this point in the history
* Add many new hats

* disable some shapes by default

* Tweak docs
  • Loading branch information
pokey authored Sep 2, 2021
1 parent 8235039 commit 18c7598
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
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

0 comments on commit 18c7598

Please sign in to comment.