From 8ee2e7e76ec7e0612bb8a63248a1cfd38548b292 Mon Sep 17 00:00:00 2001 From: Pokey Rule <755842+pokey@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:31:11 +0000 Subject: [PATCH] changes --- apps/vscode/vscode.py | 8 +-- apps/vscode/vscode.talon | 49 ++++++++++--------- core/windows_and_tabs/window_management.talon | 2 +- cursorless-settings/actions.csv | 8 +++ .../experimental/actions_custom.csv | 4 +- .../experimental/experimental_actions.csv | 1 + cursorless-settings/modifier_scope_types.csv | 4 ++ cursorless-settings/modifiers.csv | 4 ++ settings.talon | 2 +- tags/browser/browser.talon | 13 +++++ 10 files changed, 66 insertions(+), 29 deletions(-) diff --git a/apps/vscode/vscode.py b/apps/vscode/vscode.py index 1bba0f2367..1f1a834d97 100644 --- a/apps/vscode/vscode.py +++ b/apps/vscode/vscode.py @@ -542,18 +542,20 @@ def vscode_language_id() -> str: mod.list("language_id", "language id") ctx.lists["user.language_id"] = { "bash": "bash", + "go": "go", "html": "html", "jason": "json", "java": "java", + "javascript": "javascript", "lay tech": "tex", "markdown": "markdown", "python": "python", "ruby": "ruby", "rust": "rust", "scala": "scala", + "talon": "talon", "text": "plaintext", "typescript": "typescript", - "javascript": "javascript", - "go": "go", - "talon": "talon", + "xml": "xml", + "yaml": "yaml", } diff --git a/apps/vscode/vscode.talon b/apps/vscode/vscode.talon index b41929e6d5..33717da633 100644 --- a/apps/vscode/vscode.talon +++ b/apps/vscode/vscode.talon @@ -35,19 +35,19 @@ bar extensions: user.vscode("workbench.view.extensions") bar outline: user.vscode("outline.focus") bar run: user.vscode("workbench.view.debug") bar source: user.vscode("workbench.view.scm") -list wreck: user.vscode("pr:github.focus") +(list wreck | wreck list | rec list | reckless): user.vscode("pr:github.focus") bar test: user.vscode("workbench.view.testing.focus") side dog: user.vscode("workbench.action.toggleSidebarVisibility") search next: user.vscode("search.action.focusNextSearchResult") search last: user.vscode("search.action.focusPreviousSearchResult") bar collapse: user.vscode("workbench.files.action.collapseExplorerFolders") - symbol here [] [halt]: +( symbol here | symbol here ) [] [halt]: user.vscode("workbench.action.gotoSymbol") sleep(50ms) user.insert_formatted(text or "", "NO_SPACES") - symbol here [halt]: +( symbol here | symbol here ) [halt]: user.vscode("workbench.action.gotoSymbol") sleep(50ms) user.insert_formatted(text or "", "NO_SPACES") @@ -55,12 +55,12 @@ bar collapse: user.vscode("workbench.files.action.collapseExplorerFolders") key(enter) sleep(50ms) - symbol [] [halt]: +( symbol | symbol ) [] [halt]: user.vscode("workbench.action.showAllSymbols") sleep(50ms) user.insert_formatted(text or "", "NO_SPACES") - symbol [halt]: +( symbol | symbol ) [halt]: user.vscode("workbench.action.showAllSymbols") sleep(50ms) user.insert_formatted(text or "", "NO_SPACES") @@ -108,20 +108,20 @@ zen mode: user.vscode("workbench.action.closeSidebar") user.vscode("workbench.action.closePanel") # File Commands - dock [] [{user.file_extension}] [halt]: +( dock | dock | dockless) [] [{user.file_extension}] [halt]: user.vscode("workbench.action.quickOpen") sleep(400ms) insert(text or "") insert(file_extension or "") sleep(300ms) - dock clip: +( dock | dock ) clip: user.vscode("workbench.action.quickOpen") sleep(400ms) edit.paste() sleep(300ms) key(enter) sleep(150ms) - dock [{user.file_extension}] [halt]: +( dock | dock ) [{user.file_extension}] [halt]: user.vscode("workbench.action.quickOpen") sleep(400ms) insert(text or "") @@ -129,7 +129,7 @@ zen mode: sleep(300ms) key(enter) sleep(150ms) -split dock [{user.file_extension}] [halt]: +(split dock | dock split) [{user.file_extension}] [halt]: user.vscode("workbench.action.quickOpen") sleep(400ms) insert(text or "") @@ -139,7 +139,7 @@ split dock [{user.file_extension}] [halt]: sleep(150ms) key(escape) user.split_next() - dock: +( dock | dock ): user.vscode("workbench.action.openPreviousRecentlyUsedEditorInGroup") alter: user.vscode("alternate.alternateFile") make alter: user.vscode("alternate.createAlternateFile") @@ -153,6 +153,9 @@ dock make [( | )] [{user.file_extension}]: extension = file_extension or "" user.vscode_with_plugin("andreas.newFile", "{formatted}{text_formatted}{extension}") sleep(150ms) +dock make clip: + user.vscode_with_plugin("andreas.newFile", clip.text()) + sleep(150ms) dock make root: user.vscode("fileutils.newFileAtRoot") dock rename: user.vscode("fileutils.renameFile") @@ -222,12 +225,12 @@ spring forward: user.vscode("workbench.action.navigateForward") usage: user.vscode("references-view.find") # Bookmarks. Requires Bookmarks plugin - sesh [] [halt]: +( sesh | sesh ) [] [halt]: user.vscode("workbench.action.openRecent") sleep(250ms) user.insert_formatted(text or "", "DASH_SEPARATED,ALL_LOWERCASE") sleep(250ms) - sesh [] [halt]: +( sesh | sesh ) [] [halt]: user.vscode("workbench.action.openRecent") sleep(250ms) user.insert_formatted(text or "", "DASH_SEPARATED,ALL_LOWERCASE") @@ -242,12 +245,12 @@ new sesh []: sleep(250ms) go edit: user.vscode("workbench.action.navigateToLastEditLocation") - win []: +( win | win ) []: user.vscode("workbench.action.switchWindow") sleep(250ms) insert(text or "") sleep(250ms) - win []: +( win | win ) []: user.vscode("workbench.action.switchWindow") sleep(50ms) insert(text or "") @@ -424,10 +427,10 @@ pop branch next []: key(enter) dock open: user.vscode("gitlens.openWorkingFile") -wreck make: user.vscode("pr.create") -wreck show: user.vscode("prStatus:github.focus") +(wreck | rec) make: user.vscode("pr.create") +(wreck | rec) show: user.vscode("prStatus:github.focus") dock viewed: user.vscode("pr.markFileAsViewed") -wreck web: user.vscode("pr.openPullRequestOnGitHub") +(wreck | rec) web: user.vscode("pr.openPullRequestOnGitHub") # Use keyboard shortcuts because VSCode relies on when clause contexts to choose the appropriate # action: https://code.visualstudio.com/api/references/when-clause-contexts change next: key(alt-f5) @@ -600,7 +603,7 @@ skip: user.vscode("jumpToNextSnippetPlaceholder") comment next: user.vscode("editor.action.nextCommentThreadAction") -comments show: user.vscode("workbench.action.focusCommentsPanel") +comment show: user.vscode("workbench.action.focusCommentsPanel") line numbers on: user.change_setting("editor.lineNumbers", "on") line numbers off: user.change_setting("editor.lineNumbers", "off") @@ -612,10 +615,6 @@ reflow: user.vscode("rewrap.rewrapComment") mode {user.language_id}: user.vscode_with_plugin("commands.setEditorLanguage", language_id) -break : - user.cursorless_command("setSelectionBefore", cursorless_target) - user.vscode("hideSuggestWidget") - key("enter") break: user.vscode("hideSuggestWidget") key("enter") @@ -635,7 +634,7 @@ elm wrap : user.vscode("editor.emmet.action.wrapWithAbbreviation") sleep(250ms) -wreck comment : +(wreck | rec) comment : user.cursorless_command("setSelection", cursorless_target) user.vscode("workbench.action.addComment") mode.enable("dictation") @@ -747,3 +746,7 @@ code {user.language_id} wrap : key dog: user.vscode("workbench.action.toggleScreencastMode") doc move right: user.vscode("workbench.action.moveEditorToRightGroup") doc move left: user.vscode("workbench.action.moveEditorToLeftGroup") +give all: user.run_rpc_command("removeSecondaryCursors") + +quick list: + user.run_rpc_command("cursorless.private.logQuickActions") diff --git a/core/windows_and_tabs/window_management.talon b/core/windows_and_tabs/window_management.talon index 5c859f3b5b..c32d0cb896 100644 --- a/core/windows_and_tabs/window_management.talon +++ b/core/windows_and_tabs/window_management.talon @@ -21,7 +21,7 @@ snap : snap [screen] : user.move_app_to_screen(running_applications, number) portal []$: - user.switcher_focus("Google Chrome") + user.switcher_focus("Firefox") sleep(200ms) user.parse_phrase(phrase or "") coder []$: diff --git a/cursorless-settings/actions.csv b/cursorless-settings/actions.csv index d7511bcfcd..db1ccbcb9b 100644 --- a/cursorless-settings/actions.csv +++ b/cursorless-settings/actions.csv @@ -50,6 +50,14 @@ take, setSelection type deaf, revealTypeDefinition unfold, unfoldRegion wrap, wrapWithPairedDelimiter +# from, private.setActiveTarget # 2022-02-14 14:25:32 - New entries automatically added by cursorless highlight, highlight + + +# 2023-12-06 15:30:04 - New entries automatically added by cursorless +join, joinLines + +# 2023-12-11 18:51:22 - New entries automatically added by cursorless +break, breakLine \ No newline at end of file diff --git a/cursorless-settings/experimental/actions_custom.csv b/cursorless-settings/experimental/actions_custom.csv index 3004dee344..40b0d7be52 100644 --- a/cursorless-settings/experimental/actions_custom.csv +++ b/cursorless-settings/experimental/actions_custom.csv @@ -1,5 +1,4 @@ Spoken form, VSCode command -join, editor.action.joinLines increment, andreas.increment decrement, andreas.decrement open, editor.action.openLink @@ -14,3 +13,6 @@ git stage, git.stageSelectedRanges reflow, rewrap.rewrapComment ample, editor.action.goToImplementation dock make, andreas.newFile +undo, undo +redo, redo +disk, workbench.action.files.save diff --git a/cursorless-settings/experimental/experimental_actions.csv b/cursorless-settings/experimental/experimental_actions.csv index c1b455de54..b3b39df0ef 100644 --- a/cursorless-settings/experimental/experimental_actions.csv +++ b/cursorless-settings/experimental/experimental_actions.csv @@ -1,2 +1,3 @@ Spoken form, Cursorless identifier from, experimental.setInstanceReference +# stance, experimental.setInstanceReference diff --git a/cursorless-settings/modifier_scope_types.csv b/cursorless-settings/modifier_scope_types.csv index 238b18c4cc..52688f42d1 100644 --- a/cursorless-settings/modifier_scope_types.csv +++ b/cursorless-settings/modifier_scope_types.csv @@ -83,3 +83,7 @@ command, command # experimentation and may break at any time without warning. # See https://github.com/cursorless-dev/cursorless/pull/1519#issuecomment-1745459484 access, private.fieldAccess + + +# 2023-12-06 20:41:49 - New entries automatically added by cursorless +glyph, glyph \ No newline at end of file diff --git a/cursorless-settings/modifiers.csv b/cursorless-settings/modifiers.csv index d8fc81a34c..203d0a8dfc 100644 --- a/cursorless-settings/modifiers.csv +++ b/cursorless-settings/modifiers.csv @@ -36,3 +36,7 @@ its, inferPreviousMark # 2022-10-27 19:19:10 - New entries automatically added by cursorless forward, forward + + +# 2023-12-06 20:41:49 - New entries automatically added by cursorless +visible, visible \ No newline at end of file diff --git a/settings.talon b/settings.talon index 644bd6de08..c5626ef8e3 100644 --- a/settings.talon +++ b/settings.talon @@ -1,7 +1,7 @@ - settings(): speech.debug = 1 - speech.timeout = 0.175 + speech.timeout = 0.25 speech._subtitles = 0 # Adjust the scale of the imgui to my liking diff --git a/tags/browser/browser.talon b/tags/browser/browser.talon index e3573de58a..3a47ba24c3 100644 --- a/tags/browser/browser.talon +++ b/tags/browser/browser.talon @@ -1,5 +1,6 @@ tag: browser - +press : key(letter) address bar | go address | go url: browser.focus_address() address copy | url copy | copy address | copy url: browser.focus_address() @@ -30,6 +31,18 @@ show extensions: browser.show_extensions() show history: browser.show_history() show cache: browser.show_clear_cache() +(passwordless | password list) : + key(cmd-.) + sleep(300ms) + insert("{text}") + +password pop : + key(cmd-.) + sleep(300ms) + insert("{text}") + sleep(250ms) + key(enter) + #todo - port to apps # navigating current page # help: key(?)