Skip to content
Open
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
2 changes: 2 additions & 0 deletions cursorless-talon/src/marks/decorated_mark.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def cursorless_decorated_symbol(m) -> DecoratedSymbol:
"yellow": True,
"userColor1": False,
"userColor2": False,
"userColor3": False,
"userColor4": False,
}

DEFAULT_SHAPE_ENABLEMENT = {
Expand Down
4 changes: 3 additions & 1 deletion cursorless-talon/src/spoken_forms.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@
"pink": "pink",
"yellow": "yellow",
"navy": "userColor1",
"apricot": "userColor2"
"apricot": "userColor2",
"userColor3": "userColor3",
"userColor4": "userColor4"
},
"hat_shape": {
"ex": "ex",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ type HatColor =
| "pink"
| "yellow"
| "userColor1"
| "userColor2";
| "userColor2"
| "userColor3"
| "userColor4";
type HatNonDefaultShape =
| "ex"
| "fox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ type HatColor =
| "pink"
| "yellow"
| "userColor1"
| "userColor2";
| "userColor2"
| "userColor3"
| "userColor4";
type HatNonDefaultShape =
| "ex"
| "fox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ type HatColor =
| "pink"
| "yellow"
| "userColor1"
| "userColor2";
| "userColor2"
| "userColor3"
| "userColor4";
type HatNonDefaultShape =
| "ex"
| "fox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ const hatColors: Record<string, string | null> = {
yellow: "yellow",
userColor1: "navy",
userColor2: "apricot",
userColor3: "userColor3",
userColor4: "userColor4",

default: null,
};
Expand Down
22 changes: 12 additions & 10 deletions packages/cursorless-org-docs/src/docs/user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,18 @@ Combining this with an action, we might say `"take blue air"` to select the toke

The following colors are supported. Note that to target the default (gray) hat you don't need to specify a color.

| Spoken form | Color | Internal ID | Enabled by default? |
| ----------- | ------- | ------------ | ------------------- |
| N/A | grey | `default` | ✅ |
| `"blue"` | blue | `blue` | ✅ |
| `"green"` | green | `green` | ✅ |
| `"red"` | red | `red` | ✅ |
| `"pink"` | pink | `pink` | ✅ |
| `"yellow"` | yellow | `yellow` | ✅ |
| `"navy"` | navy | `userColor1` | ❌ |
| `"apricot"` | apricot | `userColor2` | ❌ |
| Spoken form | Color | Internal ID | Enabled by default? |
| -------------- | ------- | ------------ | ------------------- |
| N/A | grey | `default` | ✅ |
| `"blue"` | blue | `blue` | ✅ |
| `"green"` | green | `green` | ✅ |
| `"red"` | red | `red` | ✅ |
| `"pink"` | pink | `pink` | ✅ |
| `"yellow"` | yellow | `yellow` | ✅ |
| `"navy"` | navy | `userColor1` | ❌ |
| `"apricot"` | apricot | `userColor2` | ❌ |
| `"userColor3"` | user 3 | `userColor3` | ❌ |
| `"userColor4"` | user 4 | `userColor4` | ❌ |

You can enable or disable colors in your VSCode settings, by searching for [`cursorless.hatEnablement.colors`](vscode://settings/cursorless.hatEnablement.colors) and checking the box next to the internal ID for the given shape as listed above. To navigate to your VSCode settings, either say "show settings", or go to File --> Preferences --> Settings.

Expand Down
44 changes: 39 additions & 5 deletions packages/cursorless-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@
},
"userColor2": {
"type": "string"
},
"userColor3": {
"type": "string"
},
"userColor4": {
"type": "string"
}
},
"default": {
Expand All @@ -437,7 +443,9 @@
"pink": "#E06CAA",
"yellow": "#E5C02C",
"userColor1": "#6a00ff",
"userColor2": "#ffd8b1"
"userColor2": "#ffd8b1",
"userColor3": "#6b8e23",
"userColor4": "#e0e0e0"
},
"additionalProperties": false
},
Expand Down Expand Up @@ -469,6 +477,12 @@
},
"userColor2": {
"type": "string"
},
"userColor3": {
"type": "string"
},
"userColor4": {
"type": "string"
}
},
"default": {
Expand All @@ -479,7 +493,9 @@
"pink": "#e0679f",
"yellow": "#edb62b",
"userColor1": "#6a00ff",
"userColor2": "#ffd8b1"
"userColor2": "#ffd8b1",
"userColor3": "#6b8e23",
"userColor4": "#e0e0e0"
},
"additionalProperties": false
},
Expand Down Expand Up @@ -700,6 +716,12 @@
},
"userColor2": {
"type": "boolean"
},
"userColor3": {
"type": "boolean"
},
"userColor4": {
"type": "boolean"
}
},
"default": {
Expand All @@ -709,7 +731,9 @@
"pink": true,
"yellow": true,
"userColor1": false,
"userColor2": false
"userColor2": false,
"userColor3": false,
"userColor4": false
},
"additionalProperties": false
},
Expand Down Expand Up @@ -792,6 +816,12 @@
},
"userColor2": {
"type": "number"
},
"userColor3": {
"type": "number"
},
"userColor4": {
"type": "number"
}
},
"default": {
Expand All @@ -801,7 +831,9 @@
"pink": 1,
"yellow": 1,
"userColor1": 1,
"userColor2": 1
"userColor2": 1,
"userColor3": 1,
"userColor4": 1
},
"additionalProperties": false
},
Expand Down Expand Up @@ -1106,7 +1138,9 @@
"pink",
"yellow",
"userColor1",
"userColor2"
"userColor2",
"userColor3",
"userColor4"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export const HAT_COLORS = [
"yellow",
"userColor1",
"userColor2",
"userColor3",
"userColor4",
] as const;

export const HAT_NON_DEFAULT_SHAPES = [
Expand Down
Loading