Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Dec 18, 2023
1 parent 0e15f41 commit 8ee2e7e
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 29 deletions.
8 changes: 5 additions & 3 deletions apps/vscode/vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
49 changes: 26 additions & 23 deletions apps/vscode/vscode.talon
Original file line number Diff line number Diff line change
Expand Up @@ -35,32 +35,32 @@ 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")

<user.show_list> symbol here [<user.text>] [halt]:
(<user.show_list> symbol here | symbol here <user.show_list>) [<user.text>] [halt]:
user.vscode("workbench.action.gotoSymbol")
sleep(50ms)
user.insert_formatted(text or "", "NO_SPACES")

<user.teleport> symbol here <user.text> [halt]:
(<user.teleport> symbol here | symbol here <user.teleport>) <user.text> [halt]:
user.vscode("workbench.action.gotoSymbol")
sleep(50ms)
user.insert_formatted(text or "", "NO_SPACES")
sleep(250ms)
key(enter)
sleep(50ms)

<user.show_list> symbol [<user.text>] [halt]:
(<user.show_list> symbol | symbol <user.show_list>) [<user.text>] [halt]:
user.vscode("workbench.action.showAllSymbols")
sleep(50ms)
user.insert_formatted(text or "", "NO_SPACES")

<user.teleport> symbol <user.text> [halt]:
(<user.teleport> symbol | symbol <user.teleport>) <user.text> [halt]:
user.vscode("workbench.action.showAllSymbols")
sleep(50ms)
user.insert_formatted(text or "", "NO_SPACES")
Expand Down Expand Up @@ -108,28 +108,28 @@ zen mode:
user.vscode("workbench.action.closeSidebar")
user.vscode("workbench.action.closePanel")
# File Commands
<user.show_list> dock [<user.text>] [{user.file_extension}] [halt]:
(<user.show_list> dock | dock <user.show_list> | dockless) [<user.text>] [{user.file_extension}] [halt]:
user.vscode("workbench.action.quickOpen")
sleep(400ms)
insert(text or "")
insert(file_extension or "")
sleep(300ms)
<user.teleport> dock clip:
(<user.teleport> dock | dock <user.teleport>) clip:
user.vscode("workbench.action.quickOpen")
sleep(400ms)
edit.paste()
sleep(300ms)
key(enter)
sleep(150ms)
<user.teleport> dock <user.text> [{user.file_extension}] [halt]:
(<user.teleport> dock | dock <user.teleport>) <user.text> [{user.file_extension}] [halt]:
user.vscode("workbench.action.quickOpen")
sleep(400ms)
insert(text or "")
insert(file_extension or "")
sleep(300ms)
key(enter)
sleep(150ms)
split dock <user.text> [{user.file_extension}] [halt]:
(split dock | dock split) <user.text> [{user.file_extension}] [halt]:
user.vscode("workbench.action.quickOpen")
sleep(400ms)
insert(text or "")
Expand All @@ -139,7 +139,7 @@ split dock <user.text> [{user.file_extension}] [halt]:
sleep(150ms)
key(escape)
user.split_next()
<user.teleport> dock:
(<user.teleport> dock | dock <user.teleport>):
user.vscode("workbench.action.openPreviousRecentlyUsedEditorInGroup")
<user.teleport> alter: user.vscode("alternate.alternateFile")
make alter: user.vscode("alternate.createAlternateFile")
Expand All @@ -153,6 +153,9 @@ dock make [(<user.format_text> | <user.text>)] [{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")
Expand Down Expand Up @@ -222,12 +225,12 @@ spring forward: user.vscode("workbench.action.navigateForward")
<user.teleport> usage: user.vscode("references-view.find")

# Bookmarks. Requires Bookmarks plugin
<user.show_list> sesh [<user.text>] [halt]:
(<user.show_list> sesh | sesh <user.show_list>) [<user.text>] [halt]:
user.vscode("workbench.action.openRecent")
sleep(250ms)
user.insert_formatted(text or "", "DASH_SEPARATED,ALL_LOWERCASE")
sleep(250ms)
<user.teleport> sesh [<user.text>] [halt]:
(<user.teleport> sesh | sesh <user.teleport>) [<user.text>] [halt]:
user.vscode("workbench.action.openRecent")
sleep(250ms)
user.insert_formatted(text or "", "DASH_SEPARATED,ALL_LOWERCASE")
Expand All @@ -242,12 +245,12 @@ new sesh [<user.text>]:
sleep(250ms)
go edit: user.vscode("workbench.action.navigateToLastEditLocation")

<user.show_list> win [<user.text>]:
(<user.show_list> win | win <user.show_list>) [<user.text>]:
user.vscode("workbench.action.switchWindow")
sleep(250ms)
insert(text or "")
sleep(250ms)
<user.teleport> win [<user.text>]:
(<user.teleport> win | win <user.teleport>) [<user.text>]:
user.vscode("workbench.action.switchWindow")
sleep(50ms)
insert(text or "")
Expand Down Expand Up @@ -424,10 +427,10 @@ pop branch next [<user.repetition_count>]:
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)
Expand Down Expand Up @@ -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")
Expand All @@ -612,10 +615,6 @@ reflow: user.vscode("rewrap.rewrapComment")
mode {user.language_id}:
user.vscode_with_plugin("commands.setEditorLanguage", language_id)

break <user.cursorless_target>:
user.cursorless_command("setSelectionBefore", cursorless_target)
user.vscode("hideSuggestWidget")
key("enter")
break:
user.vscode("hideSuggestWidget")
key("enter")
Expand All @@ -635,7 +634,7 @@ elm wrap <user.cursorless_target>:
user.vscode("editor.emmet.action.wrapWithAbbreviation")
sleep(250ms)

wreck comment <user.cursorless_target>:
(wreck | rec) comment <user.cursorless_target>:
user.cursorless_command("setSelection", cursorless_target)
user.vscode("workbench.action.addComment")
mode.enable("dictation")
Expand Down Expand Up @@ -747,3 +746,7 @@ code {user.language_id} wrap <user.cursorless_target>:
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")
2 changes: 1 addition & 1 deletion core/windows_and_tabs/window_management.talon
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ snap <user.running_applications> <user.window_snap_position>:
snap <user.running_applications> [screen] <number>:
user.move_app_to_screen(running_applications, number)
portal [<phrase>]$:
user.switcher_focus("Google Chrome")
user.switcher_focus("Firefox")
sleep(200ms)
user.parse_phrase(phrase or "")
coder [<phrase>]$:
Expand Down
8 changes: 8 additions & 0 deletions cursorless-settings/actions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion cursorless-settings/experimental/actions_custom.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Spoken form, VSCode command
join, editor.action.joinLines
increment, andreas.increment
decrement, andreas.decrement
open, editor.action.openLink
Expand All @@ -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
1 change: 1 addition & 0 deletions cursorless-settings/experimental/experimental_actions.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Spoken form, Cursorless identifier
from, experimental.setInstanceReference
# stance, experimental.setInstanceReference
4 changes: 4 additions & 0 deletions cursorless-settings/modifier_scope_types.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions cursorless-settings/modifiers.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion settings.talon
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 13 additions & 0 deletions tags/browser/browser.talon
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
tag: browser
-
press <user.letter>: key(letter)
address bar | go address | go url: browser.focus_address()
address copy | url copy | copy address | copy url:
browser.focus_address()
Expand Down Expand Up @@ -30,6 +31,18 @@ show extensions: browser.show_extensions()
show history: browser.show_history()
show cache: browser.show_clear_cache()

(passwordless | password list) <user.text>:
key(cmd-.)
sleep(300ms)
insert("{text}")

password pop <user.text>:
key(cmd-.)
sleep(300ms)
insert("{text}")
sleep(250ms)
key(enter)

#todo - port to apps
# navigating current page
# help: key(?)
Expand Down

0 comments on commit 8ee2e7e

Please sign in to comment.