From fa4e86d5c2f2bdaca5324860c26b5dcd1de83e74 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 10 Dec 2021 11:36:21 -0600 Subject: [PATCH 01/41] a few personal changes * alphabet * use 'ivy' for the letter i instead of 'sit' * teams: * 'toggle camera' * ruby * 'include [over]' * 'symbol [over]' * personal: replace the incorrect speech recognition of 'billion' with 'Boolean' --- apps/teams/teams_mac.talon | 2 +- lang/ruby/my_ruby.talon | 14 ++++++++++++++ lang/ruby/ruby.talon | 8 +++++++- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 lang/ruby/my_ruby.talon diff --git a/apps/teams/teams_mac.talon b/apps/teams/teams_mac.talon index 6b3f4b6d43..d1b4620fba 100644 --- a/apps/teams/teams_mac.talon +++ b/apps/teams/teams_mac.talon @@ -56,7 +56,7 @@ start audio call: key(super-shift-c) start video call: key(super-shift-u) toggle mute: key(super-shift-m) starch screen share session: key(super-shift-e) -toggle video: key(super-shift-o) +toggle (video | camera): key(super-shift-o) [go] [to] sharing toolbar: key(super-shift-space) decline screen share: key(super-shift-d) accept screen share: key(super-shift-a) diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon new file mode 100644 index 0000000000..756c5509ee --- /dev/null +++ b/lang/ruby/my_ruby.talon @@ -0,0 +1,14 @@ +mode: command +and mode: user.ruby +mode: command +and mode: user.auto_lang +and code.language: ruby +- +tag(): user.code_operators +tag(): user.code_comment +tag(): user.code_generic + +# Personal changes, not for general use. +# +# substitute since recognition mismatches the way i pronounce 'boolean' as 'billion' +billion: "Boolean" diff --git a/lang/ruby/ruby.talon b/lang/ruby/ruby.talon index af8dcf01ce..bcb92379b5 100644 --- a/lang/ruby/ruby.talon +++ b/lang/ruby/ruby.talon @@ -32,7 +32,13 @@ state end: "end" state begin: "begin" state rescue: "rescue " state module: "module " - +state include: "include " +^include [over]: + insert("include ") + insert(user.formatted_text(text, "PUBLIC_CAMEL_CASE")) +^symbol [over]: + insert(":") + insert(user.formatted_text(text, "snake")) ^instance $: insert("@") user.code_public_variable_formatter(text) From bc3e9c989c6dbc9642ea67d674b55ebed9b434bd Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 18 Feb 2022 17:34:40 -0600 Subject: [PATCH 02/41] added 'fresh tab' for browser, ruby commands --- apps/my_generic_browser.talon | 3 +++ lang/ruby/my_ruby.talon | 7 +++++++ lang/ruby/ruby_terminal.py | 21 +++++++++++++++++++++ lang/ruby/ruby_terminal.talon | 8 ++++++++ 4 files changed, 39 insertions(+) create mode 100644 apps/my_generic_browser.talon create mode 100644 lang/ruby/ruby_terminal.py create mode 100644 lang/ruby/ruby_terminal.talon diff --git a/apps/my_generic_browser.talon b/apps/my_generic_browser.talon new file mode 100644 index 0000000000..161f8ff18d --- /dev/null +++ b/apps/my_generic_browser.talon @@ -0,0 +1,3 @@ +tag: browser +- +fresh tab:app.tab_open() \ No newline at end of file diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index 756c5509ee..15cd69d136 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -12,3 +12,10 @@ tag(): user.code_generic # # substitute since recognition mismatches the way i pronounce 'boolean' as 'billion' billion: "Boolean" + +binding pry: "binding.pry" +pry (wear|where): "whereami" +pry next: "next" +pry continue: "continue" + +assert equals: 'assert_equals ' diff --git a/lang/ruby/ruby_terminal.py b/lang/ruby/ruby_terminal.py new file mode 100644 index 0000000000..07ea78f6c0 --- /dev/null +++ b/lang/ruby/ruby_terminal.py @@ -0,0 +1,21 @@ +from talon import Context, Module, registry, actions + +mod = Module() +ctx = Context() + +@mod.action_class +class Actions: + def rails_console(): + """runs rails console""" + def rails_server(): + """runs rails server""" + +@ctx.action_class('user') +class UserActions: + def rails_console(): + actions.insert("rails c") + actions.key("enter") + + def rails_server(): + actions.insert('rails s') + actions.key("enter") diff --git a/lang/ruby/ruby_terminal.talon b/lang/ruby/ruby_terminal.talon new file mode 100644 index 0000000000..e2a83aa7c2 --- /dev/null +++ b/lang/ruby/ruby_terminal.talon @@ -0,0 +1,8 @@ +tag: terminal +- +# tags should be activated for each specific terminal in the respective talon file + +rails (console|client): + user.rails_console() +rails server: + user.rails_server() \ No newline at end of file From 057efd2bfaffb24257e5a2c9619d0d81803ece86 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 18 Mar 2022 08:35:20 -0500 Subject: [PATCH 03/41] a few personal changes * settings.talon: *enabled "curse (yes|no)" * my_vscode.talon: * added personal "switch (arc|talon|dendron|users)" to help switch between vscode windows * markdown.py: * added code fence languages "(ruby|shell|bash) block" --- apps/vscode/my_vscode.talon | 33 +++++++++++++++++++++++++++++++++ settings.talon | 4 ++-- 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 apps/vscode/my_vscode.talon diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon new file mode 100644 index 0000000000..92056786c2 --- /dev/null +++ b/apps/vscode/my_vscode.talon @@ -0,0 +1,33 @@ +#custom vscode commands go here +app: vscode +- +tag(): user.find_and_replace +tag(): user.line_commands +tag(): user.multiple_cursors +tag(): user.snippets +tag(): user.splits +tag(): user.tabs + +switch arc: + key('ctrl-w') + sleep(100ms) + "archimedes" + key('enter') + +switch talon: + key('ctrl-w') + sleep(100ms) + "talon" + key('enter') + +switch dendron: + key('ctrl-w') + sleep(100ms) + "dendron" + key('enter') + +switch user: + key('ctrl-w') + sleep(100ms) + "user" + key('enter') diff --git a/settings.talon b/settings.talon index 2aeb7ce19b..e21f01ee4e 100644 --- a/settings.talon +++ b/settings.talon @@ -105,7 +105,7 @@ settings(): # Uncomment to enable the curse yes/curse no commands (show/hide mouse cursor). # See issue #688 for more detail: https://github.com/talonhub/community/issues/688 -# tag(): user.mouse_cursor_commands_enable +tag(): user.mouse_cursor_commands_enable # Uncomment below enable pop_twice_to_wake # Without this tag noise_trigger_pop is usually associated with pop to click actions @@ -116,7 +116,7 @@ settings(): # Enabling this tag will repeat the last command when two pops are heard within the allotted time window # Without this tag noise_trigger_pop is usually associated with pop to click actions # Enabling this tag disables other pop to click actions in command mode, including pop to click -# tag(): user.pop_twice_to_repeat +tag(): user.pop_twice_to_repeat # Uncomment the below to enable support for saying numbers without a prefix. # By default you need to say "numb one" to write "1". If you uncomment this, From 1caa53b6f8d3575308573839a6eeba7458e804ac Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 1 Apr 2022 10:05:16 -0500 Subject: [PATCH 04/41] added: * file (search|forage) for findInFiles (my_vscode.talon) * rails (my grate|migrate) [test] (ruby_terminal.talon) --- apps/vscode/my_vscode.talon | 3 +++ lang/ruby/ruby_terminal.talon | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index 92056786c2..c587f32dce 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -31,3 +31,6 @@ switch user: sleep(100ms) "user" key('enter') + +file (search|forage): + user.vscode("workbench.action.findInFiles") \ No newline at end of file diff --git a/lang/ruby/ruby_terminal.talon b/lang/ruby/ruby_terminal.talon index e2a83aa7c2..460d18f2eb 100644 --- a/lang/ruby/ruby_terminal.talon +++ b/lang/ruby/ruby_terminal.talon @@ -2,7 +2,11 @@ tag: terminal - # tags should be activated for each specific terminal in the respective talon file -rails (console|client): +rails (console|client): user.rails_console() rails server: - user.rails_server() \ No newline at end of file + user.rails_server() +rails (my grate|migrate): + 'rails db:migrate ' +rails (my grate|migrate) test: + 'rails db:migrate RAIL_ENV=test' \ No newline at end of file From 57881fa2043e56f600d8673d00c2aed68fa01054 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Thu, 9 Jun 2022 17:23:31 -0500 Subject: [PATCH 05/41] added my_vscode and my_ruby changes --- apps/vscode/my_vscode.talon | 27 ++++++++++++++++++- lang/ruby/my_ruby.talon | 23 +++++++++------- .../{ruby_terminal.py => my_ruby_terminal.py} | 4 +-- lang/ruby/my_ruby_terminal.talon | 25 +++++++++++++++++ lang/ruby/ruby.py | 8 ++++++ lang/ruby/ruby_terminal.talon | 12 --------- 6 files changed, 75 insertions(+), 24 deletions(-) rename lang/ruby/{ruby_terminal.py => my_ruby_terminal.py} (88%) create mode 100644 lang/ruby/my_ruby_terminal.talon delete mode 100644 lang/ruby/ruby_terminal.talon diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index c587f32dce..27dd55c88a 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -33,4 +33,29 @@ switch user: key('enter') file (search|forage): - user.vscode("workbench.action.findInFiles") \ No newline at end of file + user.vscode("workbench.action.findInFiles") + +file path: + user.vscode("copyRelativeFilePath") + +# from https://talonvoice.slack.com/archives/C026KPTJE6T/p1649511384551359?thread_ts=1649423777.038099&cid=C026KPTJE6T +search next: user.vscode("search.action.focusNextSearchResult") +search last: user.vscode("search.action.focusPreviousSearchResult") +search file remove: user.vscode("search.searchEditor.action.deleteFileResults") +search remove: user.vscode("search.action.remove") +# search include: +# user.mouse_helper_position_save() +# user.mouse_helper_move_image_relative("2022-04-07_10.37.15.839419.png", 0, 0, 35) +# sleep(0.05) +# mouse_click(0) +# sleep(0.05) +# user.mouse_helper_position_restore() +# key(cmd-a) +# search exclude: +# user.mouse_helper_position_save() +# user.mouse_helper_move_image_relative("2022-04-07_10.41.48.462607.png", 0, 0, 35) +# sleep(0.05) +# mouse_click(0) +# sleep(0.05) +# user.mouse_helper_position_restore() +# key(cmd-a) diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index 15cd69d136..d0ac6812dd 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -1,12 +1,14 @@ mode: command -and mode: user.ruby -mode: command -and mode: user.auto_lang +# and mode: user.ruby +# mode: command +# and mode: user.auto_lang and code.language: ruby - -tag(): user.code_operators -tag(): user.code_comment -tag(): user.code_generic +# tag(): user.code_operators +# tag(): user.code_comment +# tag(): user.code_generic +tag(): user.ruby +tag(): user.code_my_models # Personal changes, not for general use. # @@ -14,8 +16,11 @@ tag(): user.code_generic billion: "Boolean" binding pry: "binding.pry" -pry (wear|where): "whereami" -pry next: "next" -pry continue: "continue" +pry binding: "binding.pry" assert equals: 'assert_equals ' + +# this isn't working :( +# code_my_modles is defined in lang/ruby/ruby.py + find last: + "{code_my_models}.last" \ No newline at end of file diff --git a/lang/ruby/ruby_terminal.py b/lang/ruby/my_ruby_terminal.py similarity index 88% rename from lang/ruby/ruby_terminal.py rename to lang/ruby/my_ruby_terminal.py index 07ea78f6c0..5cc9f6b468 100644 --- a/lang/ruby/ruby_terminal.py +++ b/lang/ruby/my_ruby_terminal.py @@ -15,7 +15,7 @@ class UserActions: def rails_console(): actions.insert("rails c") actions.key("enter") - + def rails_server(): - actions.insert('rails s') + actions.insert('rails s 2>&1 | tee ../arc.log') actions.key("enter") diff --git a/lang/ruby/my_ruby_terminal.talon b/lang/ruby/my_ruby_terminal.talon new file mode 100644 index 0000000000..a23da18460 --- /dev/null +++ b/lang/ruby/my_ruby_terminal.talon @@ -0,0 +1,25 @@ +tag: terminal +- +# tags should be activated for each specific terminal in the respective talon file + +rails (console|client): + user.rails_console() +rails server: + user.rails_server() +rails (my grate|migrate): + 'rails db:migrate ' +rails (my grate|migrate) test: + 'rails db:migrate RAIL_ENV=test' +rails test: + 'rails test ' +pry (wear|where): "whereami\n" +pry next: "next\n" +pry continue: "continue\n" +pry dupe: + edit.copy() + sleep(50ms) + edit.paste() + # sleep(500ms) + # actions.key("enter") +pry history: "history\n" +pry replay : "history --replay {number}" diff --git a/lang/ruby/ruby.py b/lang/ruby/ruby.py index 4b99e76f59..59609789ec 100644 --- a/lang/ruby/ruby.py +++ b/lang/ruby/ruby.py @@ -95,3 +95,11 @@ def code_default_function(text: str): ) ) actions.user.paste(result) + +ctx.lists["code_my_models"] = { + "fulfillment": "Fulfillment", + "line item": "LineItem", + "reservation": "Reservation", + "order": "Order", + "user": "User" +} \ No newline at end of file diff --git a/lang/ruby/ruby_terminal.talon b/lang/ruby/ruby_terminal.talon deleted file mode 100644 index 460d18f2eb..0000000000 --- a/lang/ruby/ruby_terminal.talon +++ /dev/null @@ -1,12 +0,0 @@ -tag: terminal -- -# tags should be activated for each specific terminal in the respective talon file - -rails (console|client): - user.rails_console() -rails server: - user.rails_server() -rails (my grate|migrate): - 'rails db:migrate ' -rails (my grate|migrate) test: - 'rails db:migrate RAIL_ENV=test' \ No newline at end of file From 2fe01ce04c6e4f2814bfeda62833add71319edc7 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 21 Jun 2022 10:18:46 -0500 Subject: [PATCH 06/41] updated markdown.talon and my_ruby_terminal.talon --- lang/ruby/my_ruby_terminal.talon | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lang/ruby/my_ruby_terminal.talon b/lang/ruby/my_ruby_terminal.talon index a23da18460..e45f175a1d 100644 --- a/lang/ruby/my_ruby_terminal.talon +++ b/lang/ruby/my_ruby_terminal.talon @@ -23,3 +23,5 @@ pry dupe: # actions.key("enter") pry history: "history\n" pry replay : "history --replay {number}" + +light user: 'Lti13User.' From 33d5eaa8a899a46093bdcd10c7250d0413d7d3c5 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Thu, 11 Aug 2022 11:24:25 -0500 Subject: [PATCH 07/41] updates to markdown, my_ruby. branch: ghouston-master --- lang/markdown/markdown.talon | 4 ++++ lang/ruby/my_ruby.talon | 4 +++- lang/ruby/my_ruby_terminal.py | 3 ++- lang/ruby/my_ruby_terminal.talon | 14 +++++++++++++- 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/lang/markdown/markdown.talon b/lang/markdown/markdown.talon index 7f614bac62..8f7d8f0ced 100644 --- a/lang/markdown/markdown.talon +++ b/lang/markdown/markdown.talon @@ -42,3 +42,7 @@ list six: user.insert_snippet("```{markdown_code_block_language}\n$0\n```") link: user.insert_snippet_by_name("link") + +# toggle preview is specific to dendron extension +(toggle|togo) preview: key('super-ctrl-p') + diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index d0ac6812dd..49ddee2533 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -23,4 +23,6 @@ assert equals: 'assert_equals ' # this isn't working :( # code_my_modles is defined in lang/ruby/ruby.py find last: - "{code_my_models}.last" \ No newline at end of file + "{code_my_models}.last" + +present [a]: "present?" diff --git a/lang/ruby/my_ruby_terminal.py b/lang/ruby/my_ruby_terminal.py index 5cc9f6b468..18529da301 100644 --- a/lang/ruby/my_ruby_terminal.py +++ b/lang/ruby/my_ruby_terminal.py @@ -17,5 +17,6 @@ def rails_console(): actions.key("enter") def rails_server(): - actions.insert('rails s 2>&1 | tee ../arc.log') + # actions.insert('rails s 2>&1 | tee ../arc.log') + actions.insert('rails s') actions.key("enter") diff --git a/lang/ruby/my_ruby_terminal.talon b/lang/ruby/my_ruby_terminal.talon index e45f175a1d..4e541033f1 100644 --- a/lang/ruby/my_ruby_terminal.talon +++ b/lang/ruby/my_ruby_terminal.talon @@ -15,13 +15,25 @@ rails test: pry (wear|where): "whereami\n" pry next: "next\n" pry continue: "continue\n" +pry finish: "finish\n" pry dupe: edit.copy() sleep(50ms) edit.paste() # sleep(500ms) # actions.key("enter") -pry history: "history\n" +pry history: "history -n 10\n" +pry history : "history -tail {number}\n" +pry history all: "history\n" pry replay : "history --replay {number}" +pry find method: "find-method " +pry show dock: "show-doc " +pry show source: "show-source " +pry back trace: "backtrace\n" +pry frame : "frame {number}" +pry frame up: "up\n" +pry frame down: "down\n" +silence: ";\n" light user: 'Lti13User.' +light launch: 'Lti13Launch.' \ No newline at end of file From e06b84cb8f6a667ea1fa964bd7f0a05ee78e3993 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Mon, 3 Oct 2022 12:26:31 -0500 Subject: [PATCH 08/41] markdown, kubectl, vs code changes --- apps/kubectl/kubectl.talon | 5 +++++ apps/kubernetes_minikube/minikube.talon | 4 ++++ apps/vscode/my_vscode.talon | 24 -------------------- apps/vscode/my_vscode_mac.talon | 28 +++++++++++++++++++++++ apps/vscode/my_vscode_win.talon | 30 +++++++++++++++++++++++++ 5 files changed, 67 insertions(+), 24 deletions(-) create mode 100644 apps/kubernetes_minikube/minikube.talon create mode 100644 apps/vscode/my_vscode_mac.talon create mode 100644 apps/vscode/my_vscode_win.talon diff --git a/apps/kubectl/kubectl.talon b/apps/kubectl/kubectl.talon index 3f6bc8876e..bf30a7e91f 100644 --- a/apps/kubectl/kubectl.talon +++ b/apps/kubectl/kubectl.talon @@ -64,3 +64,8 @@ cube detach: key("ctrl-p") key("ctrl-q") cube shell: user.insert_between("kubectl exec -it ", " -- /bin/bash") + +cube pod name: "export POD_NAME=$(kubectl get pods -o go-template --template '{{{{range .items}}}}{{{{.metadata.name}}}}{{{{\"\\n\"}}}}{{{{end}}}}') && echo Name of the Pod: $POD_NAME" +cube pod environment: "kubectl exec $POD_NAME -- env" +cube pod (shell|bash): "kubectl exec -ti $POD_NAME -- bash" +cube node port: "export NODE_PORT=$(kubectl get services/kubernetes-bootcamp -o go-template='{{{{(index .spec.ports 0).nodePort}}}}') && echo NODE_PORT=$NODE_PORT" diff --git a/apps/kubernetes_minikube/minikube.talon b/apps/kubernetes_minikube/minikube.talon new file mode 100644 index 0000000000..3682b03065 --- /dev/null +++ b/apps/kubernetes_minikube/minikube.talon @@ -0,0 +1,4 @@ +- +mini cube: "minikube " +mini cube version: "minikube version " +mini cube start: "minikube start " diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index 27dd55c88a..8b0d8f4103 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -8,30 +8,6 @@ tag(): user.snippets tag(): user.splits tag(): user.tabs -switch arc: - key('ctrl-w') - sleep(100ms) - "archimedes" - key('enter') - -switch talon: - key('ctrl-w') - sleep(100ms) - "talon" - key('enter') - -switch dendron: - key('ctrl-w') - sleep(100ms) - "dendron" - key('enter') - -switch user: - key('ctrl-w') - sleep(100ms) - "user" - key('enter') - file (search|forage): user.vscode("workbench.action.findInFiles") diff --git a/apps/vscode/my_vscode_mac.talon b/apps/vscode/my_vscode_mac.talon new file mode 100644 index 0000000000..6c89e1d940 --- /dev/null +++ b/apps/vscode/my_vscode_mac.talon @@ -0,0 +1,28 @@ +#custom vscode commands go here +app: vscode +os: mac +- +tag(): user.find_and_replace +tag(): user.line_commands +tag(): user.multiple_cursors +tag(): user.snippets +tag(): user.splits +tag(): user.tabs + +switch talon: + key('ctrl-w') + sleep(100ms) + "talon" + key('enter') + +switch dendron: + key('ctrl-w') + sleep(100ms) + "dendron" + key('enter') + +switch user: + key('ctrl-w') + sleep(100ms) + "user" + key('enter') diff --git a/apps/vscode/my_vscode_win.talon b/apps/vscode/my_vscode_win.talon new file mode 100644 index 0000000000..9349bcf5c6 --- /dev/null +++ b/apps/vscode/my_vscode_win.talon @@ -0,0 +1,30 @@ +#custom vscode commands go here +app: vscode +os: windows +- +tag(): user.find_and_replace +tag(): user.line_commands +tag(): user.multiple_cursors +tag(): user.snippets +tag(): user.splits +tag(): user.tabs + +# TODO: get this working... i need to learn about captures +# switch : +# key('alt-`') +# sleep(100ms) +# user.parse_phrase(phrase) +# key('enter') + +switch user: + key('alt-`') + sleep(100ms) + "user" + key('enter') + +# on my windows, i am running dendron in a docker dev environment +switch (docker|dendron): + key('alt-`') + sleep(100ms) + "docker" + key('enter') From f018d5913341da1d1ae4c77f07f831eecc7549bf Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Sat, 10 Dec 2022 15:44:38 -0600 Subject: [PATCH 09/41] updates for google_meet, slack_mac, my_ruby, chrome_mac --- apps/google_meet/google_meet.talon | 16 ++++++++++++++++ lang/ruby/my_ruby.talon | 1 + 2 files changed, 17 insertions(+) create mode 100644 apps/google_meet/google_meet.talon diff --git a/apps/google_meet/google_meet.talon b/apps/google_meet/google_meet.talon new file mode 100644 index 0000000000..83d6451976 --- /dev/null +++ b/apps/google_meet/google_meet.talon @@ -0,0 +1,16 @@ +app: Google Meet + +- + +# Google Meet is a Desktop version of Meet. +# Its a "Progressice Web App" which is installable on the desktop. +# Installation instructions are found at https://support.google.com/meet/answer/10708569?hl=en + +tag(): browser + +# not a lot of keyboard short cuts are available. +# so you probably want to use something like the +# vimium extension for more controls. +([toggle] mute | unmute): key(super-d) +toggle (video | camera): key(super-e) +(raise | lower | toggle) hand: key(ctrl-super-h) diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index 49ddee2533..9d748a431f 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -16,6 +16,7 @@ tag(): user.code_my_models billion: "Boolean" binding pry: "binding.pry" +binding pry remote: "binding.pry_remote" pry binding: "binding.pry" assert equals: 'assert_equals ' From 5c79a997cb88c3093a404ed7dbf2a657a54ea761 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 10 Feb 2023 10:27:41 -0600 Subject: [PATCH 10/41] add warp.talon for mac support --- apps/warp/warp.talon | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/warp/warp.talon b/apps/warp/warp.talon index fc5fa2af75..e01f3ea5c9 100644 --- a/apps/warp/warp.talon +++ b/apps/warp/warp.talon @@ -1,9 +1,11 @@ -app: warp +os: mac +app: Warp - tag(): terminal +# todo: filemanager support +#tag(): user.file_manager tag(): user.generic_unix_shell tag(): user.git tag(): user.kubectl tag(): user.tabs -tag(): user.file_manager tag(): user.readline From 46c790901f321198a4fb6e7c69b5d2b0a5a4e8eb Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 10 Feb 2023 15:27:38 -0600 Subject: [PATCH 11/41] update slack, messaging, and warp --- apps/warp/warp.talon | 2 +- tags/messaging/messaging.talon | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/warp/warp.talon b/apps/warp/warp.talon index e01f3ea5c9..aed5c9e0a3 100644 --- a/apps/warp/warp.talon +++ b/apps/warp/warp.talon @@ -1,5 +1,5 @@ os: mac -app: Warp +app: dev.warp.Warp-Stable - tag(): terminal # todo: filemanager support diff --git a/tags/messaging/messaging.talon b/tags/messaging/messaging.talon index 6bd580c910..fd4f40d9b8 100644 --- a/tags/messaging/messaging.talon +++ b/tags/messaging/messaging.talon @@ -7,8 +7,8 @@ channel: user.messaging_open_channel_picker() channel : user.messaging_open_channel_picker() insert(user.formatted_text(user.text, "ALL_LOWERCASE")) -channel up: user.messaging_channel_previous() -channel down: user.messaging_channel_next() +channel (up | previous): user.messaging_channel_previous() +channel (down | next): user.messaging_channel_next() ([channel] unread last | gopreev): user.messaging_unread_previous() ([channel] unread next | goneck): user.messaging_unread_next() go (find | search): user.messaging_open_search() From 761607701161bfa2740c575fb0b716160a35aa1a Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 19 May 2023 13:42:12 -0500 Subject: [PATCH 12/41] 2023-05-19 personalized talon tweaks --- apps/vscode/my_vscode.talon | 10 +++++++++ apps/warp/warp.talon | 17 ++++++++++++++ core/modes/code_languages.py | 2 +- core/windows_and_tabs/window_snap.py | 2 ++ .../window_snap_positions.talon-list | 1 + lang/markdown/markdown.talon | 9 ++++++++ lang/ruby/my_ruby.talon | 22 ++++++++++++++++--- lang/ruby/ruby.py | 14 ++++++------ settings.talon | 2 +- 9 files changed, 67 insertions(+), 12 deletions(-) diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index 8b0d8f4103..f5df264202 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -7,6 +7,7 @@ tag(): user.multiple_cursors tag(): user.snippets tag(): user.splits tag(): user.tabs +tag(): user.cursorless_experimental_snippets file (search|forage): user.vscode("workbench.action.findInFiles") @@ -35,3 +36,12 @@ search remove: user.vscode("search.action.remove") # sleep(0.05) # user.mouse_helper_position_restore() # key(cmd-a) + +(toggle bookmark|bookmark toggle): + key(alt-cmd-k) +bookmark toggle label: + key(alt-cmd-h) +bookmark next: key(alt-cmd-l) +bookmark previous: key(alt-cmd-j) +bar bookmark: + key(alt-cmd-g) diff --git a/apps/warp/warp.talon b/apps/warp/warp.talon index aed5c9e0a3..8e7564d68b 100644 --- a/apps/warp/warp.talon +++ b/apps/warp/warp.talon @@ -9,3 +9,20 @@ tag(): user.git tag(): user.kubectl tag(): user.tabs tag(): user.readline + +^last speck: + key(cmd-l) + "rspec" + key(ctrl-r) + +# ^last : +# key(cmd-l) +# mimic(phrase) +# key(ctrl-r) + +# ^command []: +# key(cmd-l) +# mimic(phrase or "") +# # user.parse_phrase(phrase or "") + +# last one: key(ctrl-r) diff --git a/core/modes/code_languages.py b/core/modes/code_languages.py index 3562e8bec9..7b5bbb62ed 100644 --- a/core/modes/code_languages.py +++ b/core/modes/code_languages.py @@ -42,7 +42,7 @@ def __init__(self, id: str, spoken_form: str | list[str], extensions: list[str]) Language("python", "python", ["py"]), Language("r", "are language", ["r"]), # Language("racket", "racket", ["rkt"]), - Language("ruby", "ruby", ["rb"]), + Language("ruby", "ruby", ["rb", "rake"]), Language("rust", "rust", ["rs"]), Language("scala", "scala", ["scala"]), Language("scss", "scss", ["scss"]), diff --git a/core/windows_and_tabs/window_snap.py b/core/windows_and_tabs/window_snap.py index 7582387444..5826bcd9d3 100644 --- a/core/windows_and_tabs/window_snap.py +++ b/core/windows_and_tabs/window_snap.py @@ -281,6 +281,8 @@ def __str__(self): "CENTER": RelativeScreenPos(1 / 8, 1 / 6, 7 / 8, 5 / 6), "FULL": RelativeScreenPos(0, 0, 1, 1), "FULLSCREEN": RelativeScreenPos(0, 0, 1, 1), + # Personal Customizations + "CENTER_HALF": RelativeScreenPos(0.25, 0, 0.75, 1), } diff --git a/core/windows_and_tabs/window_snap_positions.talon-list b/core/windows_and_tabs/window_snap_positions.talon-list index 959f0552d5..427078c54a 100644 --- a/core/windows_and_tabs/window_snap_positions.talon-list +++ b/core/windows_and_tabs/window_snap_positions.talon-list @@ -42,3 +42,4 @@ bottom center small: BOTTOM_CENTER_SMALL center: CENTER full: FULL fullscreen: FULLSCREEN +center half: CENTER_HALF \ No newline at end of file diff --git a/lang/markdown/markdown.talon b/lang/markdown/markdown.talon index 8f7d8f0ced..c5f843b783 100644 --- a/lang/markdown/markdown.talon +++ b/lang/markdown/markdown.talon @@ -46,3 +46,12 @@ link: user.insert_snippet_by_name("link") # toggle preview is specific to dendron extension (toggle|togo) preview: key('super-ctrl-p') +task []: + edit.line_start() + "- [ ] {phrase}" +task two []: + edit.line_start() + " - [ ] {phrase}" +task three []: + edit.line_start() + " - [ ] {phrase}" diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index 9d748a431f..f88ad310a6 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -8,7 +8,12 @@ and code.language: ruby # tag(): user.code_comment # tag(): user.code_generic tag(): user.ruby -tag(): user.code_my_models + +# same as python.talon: +state (def | deaf | deft): "def " + +# this is not working +# tag(): user.code_my_models # Personal changes, not for general use. # @@ -23,7 +28,18 @@ assert equals: 'assert_equals ' # this isn't working :( # code_my_modles is defined in lang/ruby/ruby.py - find last: - "{code_my_models}.last" +# find last: +# "{code_my_models}.last" present [a]: "present?" + +put: + "puts \"\"" + key(left) + +to jason: ".to_json" + +shazam: + "#{}" + key(left) + diff --git a/lang/ruby/ruby.py b/lang/ruby/ruby.py index 59609789ec..edaa36fae4 100644 --- a/lang/ruby/ruby.py +++ b/lang/ruby/ruby.py @@ -96,10 +96,10 @@ def code_default_function(text: str): ) actions.user.paste(result) -ctx.lists["code_my_models"] = { - "fulfillment": "Fulfillment", - "line item": "LineItem", - "reservation": "Reservation", - "order": "Order", - "user": "User" -} \ No newline at end of file +# ctx.lists["code_my_models"] = { +# "fulfillment": "Fulfillment", +# "line item": "LineItem", +# "reservation": "Reservation", +# "order": "Order", +# "user": "User" +# } diff --git a/settings.talon b/settings.talon index e21f01ee4e..e6f0031692 100644 --- a/settings.talon +++ b/settings.talon @@ -40,7 +40,7 @@ settings(): # 0 = off # 1 = on with eyetracker but not zoom mouse mode # 2 = on but not with zoom mouse mode - user.mouse_enable_pop_click = 1 + user.mouse_enable_pop_click = 0 # If `true`, use a hissing noise to scroll continuously user.mouse_enable_hiss_scroll = false From 6733cb7cca3b345a1f2c9908076b951f0cdd60b1 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 26 May 2023 20:14:02 -0500 Subject: [PATCH 13/41] personal tweaks for vscode, warp, ruby --- apps/vscode/my_vscode.talon | 28 +++++++++++++++++++++------- apps/warp/warp.talon | 5 ++++- lang/ruby/ruby.talon | 2 +- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index f5df264202..1eee8e2f70 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -37,11 +37,25 @@ search remove: user.vscode("search.action.remove") # user.mouse_helper_position_restore() # key(cmd-a) -(toggle bookmark|bookmark toggle): - key(alt-cmd-k) -bookmark toggle label: + +# Bookmarks. Requires Bookmarks plugin +go marks: user.vscode("workbench.view.extension.bookmarks") +toggle mark: user.vscode("bookmarks.toggle") +go next mark: user.vscode("bookmarks.jumpToNext") +go last mark: user.vscode("bookmarks.jumpToPrevious") + +# alternatives to Bookmarks in vscode.talon +# go marks +bar mark: user.vscode("workbench.view.extension.bookmarks") +# go next mark +mark next: user.vscode("bookmarks.jumpToNext") +# go last mark +mark previous: user.vscode("bookmarks.jumpToPrevious") +# toggle mark +mark toggle: user.vscode("bookmarks.toggle") +(toggle mark|mark toggle) label: key(alt-cmd-h) -bookmark next: key(alt-cmd-l) -bookmark previous: key(alt-cmd-j) -bar bookmark: - key(alt-cmd-g) + +(tab pin|pin toggle): + key(cmd-k) + key(shift-enter) diff --git a/apps/warp/warp.talon b/apps/warp/warp.talon index 8e7564d68b..3a287fa1ad 100644 --- a/apps/warp/warp.talon +++ b/apps/warp/warp.talon @@ -25,4 +25,7 @@ tag(): user.readline # mimic(phrase or "") # # user.parse_phrase(phrase or "") -# last one: key(ctrl-r) +last one: + key(cmd-l) + key(up) + key(enter) diff --git a/lang/ruby/ruby.talon b/lang/ruby/ruby.talon index bcb92379b5..b300e48905 100644 --- a/lang/ruby/ruby.talon +++ b/lang/ruby/ruby.talon @@ -36,7 +36,7 @@ state include: "include " ^include [over]: insert("include ") insert(user.formatted_text(text, "PUBLIC_CAMEL_CASE")) -^symbol [over]: +^symbolize [over]: insert(":") insert(user.formatted_text(text, "snake")) ^instance $: From 2e0c65ca5e1525383a10c2b02cd1219f54dc2318 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Wed, 14 Jun 2023 09:58:30 -0500 Subject: [PATCH 14/41] add binding break to my_ruby --- lang/ruby/my_ruby.talon | 1 + 1 file changed, 1 insertion(+) diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index f88ad310a6..3fa903c487 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -23,6 +23,7 @@ billion: "Boolean" binding pry: "binding.pry" binding pry remote: "binding.pry_remote" pry binding: "binding.pry" +binding break: "binding.break" assert equals: 'assert_equals ' From 9188e2444cb8c229f64c2d8fbfb81e189f9b5125 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Wed, 14 Jun 2023 10:27:40 -0500 Subject: [PATCH 15/41] restore default user.mouse_enable_pop_click setting --- settings.talon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.talon b/settings.talon index e6f0031692..e21f01ee4e 100644 --- a/settings.talon +++ b/settings.talon @@ -40,7 +40,7 @@ settings(): # 0 = off # 1 = on with eyetracker but not zoom mouse mode # 2 = on but not with zoom mouse mode - user.mouse_enable_pop_click = 0 + user.mouse_enable_pop_click = 1 # If `true`, use a hissing noise to scroll continuously user.mouse_enable_hiss_scroll = false From 03d1d19c166b0bf5b3c050e451b1661205e489b3 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 29 Aug 2023 17:15:50 -0500 Subject: [PATCH 16/41] updated warp `last speck` command --- apps/warp/warp.talon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/warp/warp.talon b/apps/warp/warp.talon index 3a287fa1ad..b4409ee47f 100644 --- a/apps/warp/warp.talon +++ b/apps/warp/warp.talon @@ -12,7 +12,7 @@ tag(): user.readline ^last speck: key(cmd-l) - "rspec" + "spec" key(ctrl-r) # ^last : From 8247c9ff3a22a19c87df89b092e9c26f97a83c42 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Thu, 31 Aug 2023 10:01:30 -0500 Subject: [PATCH 17/41] added 'pop sibling' to my_vscode.talon --- apps/vscode/my_vscode.talon | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index 1eee8e2f70..4dffdc2d66 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -59,3 +59,10 @@ mark toggle: user.vscode("bookmarks.toggle") (tab pin|pin toggle): key(cmd-k) key(shift-enter) + +# requires the extension: https://marketplace.visualstudio.com/items?itemName=testdouble.vscode-alternate-alternate-file +pop sibling: + user.vscode("workbench.action.showCommands") + insert("alternate file") + sleep(100ms) + key(enter) \ No newline at end of file From c694789cdec947b5b286873f8764990516908493 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Thu, 14 Sep 2023 17:49:13 -0500 Subject: [PATCH 18/41] add comment about project name in vscode --- apps/vscode/my_vscode_mac.talon | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/vscode/my_vscode_mac.talon b/apps/vscode/my_vscode_mac.talon index 6c89e1d940..afa4d800f5 100644 --- a/apps/vscode/my_vscode_mac.talon +++ b/apps/vscode/my_vscode_mac.talon @@ -9,6 +9,8 @@ tag(): user.snippets tag(): user.splits tag(): user.tabs +# note: change vscode preferences window title to `[${rootName}] ${activeEditorShort}${separator}${profileName}` +# so that project name is first and inside []. switch talon: key('ctrl-w') sleep(100ms) From ee17d0f5fae22814d2505976e9cda14cc5531f2e Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Wed, 27 Sep 2023 10:12:31 -0500 Subject: [PATCH 19/41] 2023-09-27 --- apps/vscode/my_vscode.talon | 7 ++++++- lang/ruby/my_ruby.talon | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index 4dffdc2d66..61317d551d 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -65,4 +65,9 @@ pop sibling: user.vscode("workbench.action.showCommands") insert("alternate file") sleep(100ms) - key(enter) \ No newline at end of file + key(enter) + +tab hunt : + user.vscode("workbench.action.quickOpen") + insert("edt ") + insert(user.text or "") diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index 3fa903c487..d79a10fde0 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -44,3 +44,12 @@ shazam: "#{}" key(left) + +prompt : + "# " + insert(phrase) + insert("\n") + key('alt-ctrl-i') + +suggest: + key('ctrl-alt-i') From a9a61b88355e3a7f4719c7877378c6f1e1680cc6 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Thu, 28 Sep 2023 17:21:10 -0500 Subject: [PATCH 20/41] add "key " to ruby.talon --- lang/ruby/ruby.talon | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lang/ruby/ruby.talon b/lang/ruby/ruby.talon index b300e48905..fc7590d9f7 100644 --- a/lang/ruby/ruby.talon +++ b/lang/ruby/ruby.talon @@ -42,3 +42,6 @@ state include: "include " ^instance $: insert("@") user.code_public_variable_formatter(text) +^key $: + insert(user.formatted_text(text, "snake")) + insert(":") \ No newline at end of file From 3f8f86fd8057c66163e412da70f33aa1edb5f52b Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 10 Nov 2023 09:54:38 -0600 Subject: [PATCH 21/41] improve git --force-if-includes; vscode copilot suggest --- apps/vscode/my_vscode.talon | 4 ++++ lang/ruby/my_ruby.talon | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index 61317d551d..72de70d1b7 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -71,3 +71,7 @@ tab hunt : user.vscode("workbench.action.quickOpen") insert("edt ") insert(user.text or "") + + +suggest: + user.vscode("editor.action.inlineSuggest.trigger") diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index d79a10fde0..bac1f7be22 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -51,5 +51,5 @@ prompt : insert("\n") key('alt-ctrl-i') -suggest: - key('ctrl-alt-i') + + From 0b7bd6f9275e162220d1d5e164d0d556c0dc06bc Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 10 Dec 2021 11:36:21 -0600 Subject: [PATCH 22/41] a few personal changes * alphabet * use 'ivy' for the letter i instead of 'sit' * teams: * 'toggle camera' * ruby * 'include [over]' * 'symbol [over]' * personal: replace the incorrect speech recognition of 'billion' with 'Boolean' --- apps/git/git_argument.talon-list | 2 ++ lang/ruby/my_ruby.talon | 3 --- lang/ruby/ruby.talon | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/git/git_argument.talon-list b/apps/git/git_argument.talon-list index ac991af401..eeb8c93520 100644 --- a/apps/git/git_argument.talon-list +++ b/apps/git/git_argument.talon-list @@ -21,6 +21,8 @@ fast forward only: --ff-only force: --force force create: --force-create force with lease: --force-with-lease +force if includes: --force-if-includes +force safely: --force-with-lease --force-if-includes global: --global global: --global hard: --hard diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index bac1f7be22..ee42c7bfab 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -50,6 +50,3 @@ prompt : insert(phrase) insert("\n") key('alt-ctrl-i') - - - diff --git a/lang/ruby/ruby.talon b/lang/ruby/ruby.talon index fc7590d9f7..56dfb2c24d 100644 --- a/lang/ruby/ruby.talon +++ b/lang/ruby/ruby.talon @@ -37,6 +37,7 @@ state include: "include " insert("include ") insert(user.formatted_text(text, "PUBLIC_CAMEL_CASE")) ^symbolize [over]: +^symbol [over]: insert(":") insert(user.formatted_text(text, "snake")) ^instance $: @@ -44,4 +45,4 @@ state include: "include " user.code_public_variable_formatter(text) ^key $: insert(user.formatted_text(text, "snake")) - insert(":") \ No newline at end of file + insert(":") From 9700e6423339d3441ca156a2c91f1d4812d02f05 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 18 Feb 2022 17:34:40 -0600 Subject: [PATCH 23/41] added 'fresh tab' for browser, ruby commands --- lang/ruby/my_ruby.talon | 3 +++ lang/ruby/ruby_terminal.py | 21 +++++++++++++++++++++ lang/ruby/ruby_terminal.talon | 8 ++++++++ 3 files changed, 32 insertions(+) create mode 100644 lang/ruby/ruby_terminal.py create mode 100644 lang/ruby/ruby_terminal.talon diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index ee42c7bfab..6a9bcc24f6 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -24,6 +24,9 @@ binding pry: "binding.pry" binding pry remote: "binding.pry_remote" pry binding: "binding.pry" binding break: "binding.break" +pry (wear|where): "whereami" +pry next: "next" +pry continue: "continue" assert equals: 'assert_equals ' diff --git a/lang/ruby/ruby_terminal.py b/lang/ruby/ruby_terminal.py new file mode 100644 index 0000000000..07ea78f6c0 --- /dev/null +++ b/lang/ruby/ruby_terminal.py @@ -0,0 +1,21 @@ +from talon import Context, Module, registry, actions + +mod = Module() +ctx = Context() + +@mod.action_class +class Actions: + def rails_console(): + """runs rails console""" + def rails_server(): + """runs rails server""" + +@ctx.action_class('user') +class UserActions: + def rails_console(): + actions.insert("rails c") + actions.key("enter") + + def rails_server(): + actions.insert('rails s') + actions.key("enter") diff --git a/lang/ruby/ruby_terminal.talon b/lang/ruby/ruby_terminal.talon new file mode 100644 index 0000000000..e2a83aa7c2 --- /dev/null +++ b/lang/ruby/ruby_terminal.talon @@ -0,0 +1,8 @@ +tag: terminal +- +# tags should be activated for each specific terminal in the respective talon file + +rails (console|client): + user.rails_console() +rails server: + user.rails_server() \ No newline at end of file From 9854713b0ccb31e8be36dc3080572fca0ba5438f Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 1 Apr 2022 10:05:16 -0500 Subject: [PATCH 24/41] added: * file (search|forage) for findInFiles (my_vscode.talon) * rails (my grate|migrate) [test] (ruby_terminal.talon) --- lang/ruby/ruby_terminal.talon | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lang/ruby/ruby_terminal.talon b/lang/ruby/ruby_terminal.talon index e2a83aa7c2..460d18f2eb 100644 --- a/lang/ruby/ruby_terminal.talon +++ b/lang/ruby/ruby_terminal.talon @@ -2,7 +2,11 @@ tag: terminal - # tags should be activated for each specific terminal in the respective talon file -rails (console|client): +rails (console|client): user.rails_console() rails server: - user.rails_server() \ No newline at end of file + user.rails_server() +rails (my grate|migrate): + 'rails db:migrate ' +rails (my grate|migrate) test: + 'rails db:migrate RAIL_ENV=test' \ No newline at end of file From ca8dfbe38c5de9f3a7cfce4bee278a7e35f47521 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Thu, 9 Jun 2022 17:23:31 -0500 Subject: [PATCH 25/41] added my_vscode and my_ruby changes --- lang/ruby/my_ruby_terminal.talon | 2 +- lang/ruby/ruby_terminal.py | 21 --------------------- lang/ruby/ruby_terminal.talon | 12 ------------ 3 files changed, 1 insertion(+), 34 deletions(-) delete mode 100644 lang/ruby/ruby_terminal.py delete mode 100644 lang/ruby/ruby_terminal.talon diff --git a/lang/ruby/my_ruby_terminal.talon b/lang/ruby/my_ruby_terminal.talon index 4e541033f1..b7240a9eae 100644 --- a/lang/ruby/my_ruby_terminal.talon +++ b/lang/ruby/my_ruby_terminal.talon @@ -36,4 +36,4 @@ pry frame down: "down\n" silence: ";\n" light user: 'Lti13User.' -light launch: 'Lti13Launch.' \ No newline at end of file +light launch: 'Lti13Launch.' diff --git a/lang/ruby/ruby_terminal.py b/lang/ruby/ruby_terminal.py deleted file mode 100644 index 07ea78f6c0..0000000000 --- a/lang/ruby/ruby_terminal.py +++ /dev/null @@ -1,21 +0,0 @@ -from talon import Context, Module, registry, actions - -mod = Module() -ctx = Context() - -@mod.action_class -class Actions: - def rails_console(): - """runs rails console""" - def rails_server(): - """runs rails server""" - -@ctx.action_class('user') -class UserActions: - def rails_console(): - actions.insert("rails c") - actions.key("enter") - - def rails_server(): - actions.insert('rails s') - actions.key("enter") diff --git a/lang/ruby/ruby_terminal.talon b/lang/ruby/ruby_terminal.talon deleted file mode 100644 index 460d18f2eb..0000000000 --- a/lang/ruby/ruby_terminal.talon +++ /dev/null @@ -1,12 +0,0 @@ -tag: terminal -- -# tags should be activated for each specific terminal in the respective talon file - -rails (console|client): - user.rails_console() -rails server: - user.rails_server() -rails (my grate|migrate): - 'rails db:migrate ' -rails (my grate|migrate) test: - 'rails db:migrate RAIL_ENV=test' \ No newline at end of file From 010d978cc68d4c8ef1f8189521b3232e0689c26b Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 10 Feb 2023 10:27:41 -0600 Subject: [PATCH 26/41] add warp.talon for mac support --- apps/warp/warp.talon | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/warp/warp.talon b/apps/warp/warp.talon index b4409ee47f..02f1a0c680 100644 --- a/apps/warp/warp.talon +++ b/apps/warp/warp.talon @@ -1,5 +1,6 @@ os: mac app: dev.warp.Warp-Stable +app: warp - tag(): terminal # todo: filemanager support From f4c682e83f47591f0241f9fb0dc95e327aab8613 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 19 May 2023 13:42:12 -0500 Subject: [PATCH 27/41] 2023-05-19 personalized talon tweaks --- apps/vscode/my_vscode.talon | 10 ++++++++++ lang/ruby/my_ruby.talon | 1 - settings.talon | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index 72de70d1b7..c689fcf244 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -37,6 +37,7 @@ search remove: user.vscode("search.action.remove") # user.mouse_helper_position_restore() # key(cmd-a) +<<<<<<< HEAD # Bookmarks. Requires Bookmarks plugin go marks: user.vscode("workbench.view.extension.bookmarks") @@ -75,3 +76,12 @@ tab hunt : suggest: user.vscode("editor.action.inlineSuggest.trigger") + +(toggle bookmark|bookmark toggle): + key(alt-cmd-k) +bookmark toggle label: + key(alt-cmd-h) +bookmark next: key(alt-cmd-l) +bookmark previous: key(alt-cmd-j) +bar bookmark: + key(alt-cmd-g) diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index 6a9bcc24f6..b79a980568 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -47,7 +47,6 @@ shazam: "#{}" key(left) - prompt : "# " insert(phrase) diff --git a/settings.talon b/settings.talon index e21f01ee4e..e6f0031692 100644 --- a/settings.talon +++ b/settings.talon @@ -40,7 +40,7 @@ settings(): # 0 = off # 1 = on with eyetracker but not zoom mouse mode # 2 = on but not with zoom mouse mode - user.mouse_enable_pop_click = 1 + user.mouse_enable_pop_click = 0 # If `true`, use a hissing noise to scroll continuously user.mouse_enable_hiss_scroll = false From 56e492fe362b6f03e9978196b7a6bec8273606c7 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 7 Jan 2025 10:36:21 -0600 Subject: [PATCH 28/41] personal tweaks for vscode, warp, ruby --- apps/vscode/my_vscode.talon | 5 ----- lang/ruby/ruby.talon | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index c689fcf244..49408ae74e 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -37,7 +37,6 @@ search remove: user.vscode("search.action.remove") # user.mouse_helper_position_restore() # key(cmd-a) -<<<<<<< HEAD # Bookmarks. Requires Bookmarks plugin go marks: user.vscode("workbench.view.extension.bookmarks") @@ -81,7 +80,3 @@ suggest: key(alt-cmd-k) bookmark toggle label: key(alt-cmd-h) -bookmark next: key(alt-cmd-l) -bookmark previous: key(alt-cmd-j) -bar bookmark: - key(alt-cmd-g) diff --git a/lang/ruby/ruby.talon b/lang/ruby/ruby.talon index 56dfb2c24d..941b2a88d7 100644 --- a/lang/ruby/ruby.talon +++ b/lang/ruby/ruby.talon @@ -36,8 +36,7 @@ state include: "include " ^include [over]: insert("include ") insert(user.formatted_text(text, "PUBLIC_CAMEL_CASE")) -^symbolize [over]: -^symbol [over]: +^(symbolize | symbol) [over]: insert(":") insert(user.formatted_text(text, "snake")) ^instance $: From eb1e6e80605475726c87c742e4f0793c8cb2041e Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Wed, 14 Jun 2023 10:27:40 -0500 Subject: [PATCH 29/41] restore default user.mouse_enable_pop_click setting --- settings.talon | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.talon b/settings.talon index e6f0031692..e21f01ee4e 100644 --- a/settings.talon +++ b/settings.talon @@ -40,7 +40,7 @@ settings(): # 0 = off # 1 = on with eyetracker but not zoom mouse mode # 2 = on but not with zoom mouse mode - user.mouse_enable_pop_click = 0 + user.mouse_enable_pop_click = 1 # If `true`, use a hissing noise to scroll continuously user.mouse_enable_hiss_scroll = false From fc7938e3ec1377845e102fde4765814461b56f8b Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 7 Jan 2025 10:41:04 -0600 Subject: [PATCH 30/41] 2023-09-27 --- lang/ruby/my_ruby.talon | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index b79a980568..c45b1ce63f 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -52,3 +52,6 @@ prompt : insert(phrase) insert("\n") key('alt-ctrl-i') + +suggest: + key('ctrl-alt-i') From 3f2643323705aae6859b3e13b5398a44ebeb5ca4 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 7 Jan 2025 10:43:44 -0600 Subject: [PATCH 31/41] improve git --force-if-includes; vscode copilot suggest --- lang/ruby/my_ruby.talon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index c45b1ce63f..6d239a7fb6 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -53,5 +53,5 @@ prompt : insert("\n") key('alt-ctrl-i') -suggest: - key('ctrl-alt-i') + + From 3736c2b0b4666b8837898a616f4de37a97d78ed3 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Thu, 11 Jan 2024 09:24:14 -0600 Subject: [PATCH 32/41] added ruby 'define ' --- lang/ruby/my_ruby.talon | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lang/ruby/my_ruby.talon b/lang/ruby/my_ruby.talon index 6d239a7fb6..42e79d6dee 100644 --- a/lang/ruby/my_ruby.talon +++ b/lang/ruby/my_ruby.talon @@ -11,6 +11,12 @@ tag(): user.ruby # same as python.talon: state (def | deaf | deft): "def " +define $: + #user.code_default_function(user.formatted_text(phrase,"snake")) + "def " + user.insert_formatted(phrase, "snake") + insert("()") + key(left) # this is not working # tag(): user.code_my_models From 96d0118bb549763ede9b6460f33e7c0c88a75701 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 7 Jan 2025 10:44:54 -0600 Subject: [PATCH 33/41] add vscode copilot and open link commands --- apps/vscode/my_vscode.talon | 2 ++ apps/vscode/my_vscode_mac.talon | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index 49408ae74e..c45284dc80 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -80,3 +80,5 @@ suggest: key(alt-cmd-k) bookmark toggle label: key(alt-cmd-h) +(go to | follow) link: + user.vscode('editor.action.openLink') diff --git a/apps/vscode/my_vscode_mac.talon b/apps/vscode/my_vscode_mac.talon index afa4d800f5..83563020fa 100644 --- a/apps/vscode/my_vscode_mac.talon +++ b/apps/vscode/my_vscode_mac.talon @@ -28,3 +28,30 @@ switch user: sleep(100ms) "user" key('enter') + +chat switch: + user.vscode("workbench.panel.chat.view.copilot.focus") + +copilot switch: + user.vscode("workbench.panel.chat.view.copilot.focus") + sleep(100ms) + insert("@workspace ") + #user.vscode("type", { text: "@workspace " }) + +copilot code switch: + user.vscode("workbench.panel.chat.view.copilot.focus") + sleep(100ms) + insert("@vscode ") + +copilot explain: + user.vscode("github.copilot.interactiveEditor.explain") + +copilot fix this: + user.vscode("github.copilot.interactiveEditor.fix") + +copilot inline: + user.vscode("inlineChat.start") + # user.vscode("editor.action.inlineSuggest.trigger") + +copilot search: + user.vscode("github.copilot.executeSearch") From 725a2e817b49fcd1acddbb27cce9d9a30bc3aea7 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 19 Apr 2024 14:03:55 -0500 Subject: [PATCH 34/41] 2024-04-19 added parrot cluck, other minor changes --- apps/vscode/my_vscode_mac.talon | 40 +-- core/modes/sleep_mode.talon | 27 ++ plugin/draft_editor/draft_editor.py | 2 +- plugin/draft_editor/draft_editor_open.talon | 2 +- plugin/parrot/parrot.talon | 3 + plugin/parrot/parrot_integration.py | 298 ++++++++++++++++++++ plugin/repeater/repeater.talon | 2 + 7 files changed, 352 insertions(+), 22 deletions(-) create mode 100644 plugin/parrot/parrot.talon create mode 100644 plugin/parrot/parrot_integration.py diff --git a/apps/vscode/my_vscode_mac.talon b/apps/vscode/my_vscode_mac.talon index 83563020fa..3bb6dcbd3c 100644 --- a/apps/vscode/my_vscode_mac.talon +++ b/apps/vscode/my_vscode_mac.talon @@ -29,29 +29,29 @@ switch user: "user" key('enter') -chat switch: - user.vscode("workbench.panel.chat.view.copilot.focus") +# bar (copilot | chat): +# user.vscode("workbench.panel.chat.view.copilot.focus") -copilot switch: - user.vscode("workbench.panel.chat.view.copilot.focus") - sleep(100ms) - insert("@workspace ") - #user.vscode("type", { text: "@workspace " }) +# copilot switch: +# user.vscode("workbench.panel.chat.view.copilot.focus") +# sleep(100ms) +# insert("@workspace ") +# #user.vscode("type", { text: "@workspace " }) -copilot code switch: - user.vscode("workbench.panel.chat.view.copilot.focus") - sleep(100ms) - insert("@vscode ") +# copilot code switch: +# user.vscode("workbench.panel.chat.view.copilot.focus") +# sleep(100ms) +# insert("@vscode ") -copilot explain: - user.vscode("github.copilot.interactiveEditor.explain") +# copilot explain: +# user.vscode("github.copilot.interactiveEditor.explain") -copilot fix this: - user.vscode("github.copilot.interactiveEditor.fix") +# copilot fix this: +# user.vscode("github.copilot.interactiveEditor.fix") -copilot inline: - user.vscode("inlineChat.start") - # user.vscode("editor.action.inlineSuggest.trigger") +# copilot inline: +# user.vscode("inlineChat.start") +# # user.vscode("editor.action.inlineSuggest.trigger") -copilot search: - user.vscode("github.copilot.executeSearch") +# copilot search: +# user.vscode("github.copilot.executeSearch") diff --git a/core/modes/sleep_mode.talon b/core/modes/sleep_mode.talon index 330d658909..64a879cea3 100644 --- a/core/modes/sleep_mode.talon +++ b/core/modes/sleep_mode.talon @@ -7,3 +7,30 @@ settings(): user.mouse_enable_pop_click = 0 # Stop mouse scroll down using hiss noise user.mouse_enable_hiss_scroll = false + +#================================================================================ +# Commands to wake Talon +#================================================================================ + +# Note: these have repeaters on them (+) to work around an issue where, in sleep mode, +# you can get into a situation where these commands are difficult to trigger. + +# These commands are fully anchored (^ and $), which means that there must be +# silence before and after saying them in order for them to recognize (this reduces +# false positives during normal sleep mode, normally a good thing). + +# However, ignored background speech during sleep mode also counts as an utterance. + +# Thus, if you say "blah blah blah talon wake", these won't trigger, because "blah +# blah blah" was part of the same utterance. You have to say "blah blah blah" , "talon wake" . + +# Sometimes people would forget the second pause, notice things weren't working, and +# say "talon wake" over and over again before the speech timeout ever gets hit, which +# means that these won't recognize. The (+) handles this case, so if you say +# "talon wake talon wake" , it'll still work. + +^(welcome back)+$: + user.mouse_wake() + user.history_enable() + user.talon_mode() diff --git a/plugin/draft_editor/draft_editor.py b/plugin/draft_editor/draft_editor.py index 33994f93c4..51c236cd31 100644 --- a/plugin/draft_editor/draft_editor.py +++ b/plugin/draft_editor/draft_editor.py @@ -27,7 +27,7 @@ def remove_tag(tag: str): ctx.tags = list(tags) -default_names = ["Visual Studio Code", "Code", "VSCodium", "Codium", "code-oss"] +default_names = ["Visual Studio Code - Insiders", "Code - Insiders", "Visual Studio Code", "Code", "VSCodium", "Codium", "code-oss"] mod.setting( "draft_editor", diff --git a/plugin/draft_editor/draft_editor_open.talon b/plugin/draft_editor/draft_editor_open.talon index aadcfff255..27c5c609e5 100644 --- a/plugin/draft_editor/draft_editor_open.talon +++ b/plugin/draft_editor/draft_editor_open.talon @@ -3,4 +3,4 @@ and tag: user.draft_editor_app_focused - draft submit: user.draft_editor_submit() -draft discard: user.draft_editor_discard() +draft (discard|cancel): user.draft_editor_discard() diff --git a/plugin/parrot/parrot.talon b/plugin/parrot/parrot.talon new file mode 100644 index 0000000000..b766e88684 --- /dev/null +++ b/plugin/parrot/parrot.talon @@ -0,0 +1,3 @@ +# parrot(cluck): +# print("cluck") +# app.notify("cluck") \ No newline at end of file diff --git a/plugin/parrot/parrot_integration.py b/plugin/parrot/parrot_integration.py new file mode 100644 index 0000000000..27c22313c0 --- /dev/null +++ b/plugin/parrot/parrot_integration.py @@ -0,0 +1,298 @@ +from copy import copy +from dataclasses import dataclass +from typing import Callable, Optional, Sequence +import json +import logging +import time + +from talon import Module, resource, events +from talon.debug import log_exception +from talon.experimental.parrot import ParrotSystem, ParrotDelegate, ParrotFrame +from talon_init import TALON_HOME + +PARROT_HOME = TALON_HOME / 'parrot' +pattern_path = str(PARROT_HOME / 'patterns.json') +model_path = str(PARROT_HOME / 'model.pkl') + +## START PARROT CLASSES ## +class PatternMatcher: + def detect_all(self, frame: ParrotFrame, detection_functions: list[Callable]) -> bool: + """Matcher for all detection functions""" + for detect_function in detection_functions: + if detect_function(self, frame) == False: + return False + return True + +@dataclass +class NoiseTimestamps: + last_detected_at: float = 0.0 + duration_start: float = 0.0 + detection_after: float = 0.0 + graceperiod_until: float = 0.0 + throttled_at: float = 0.0 + throttled_until: float = 0.0 + +MatchPatternCallable = Callable[['NoisePattern', ParrotFrame, float], bool] + +class NoisePattern(PatternMatcher): + """Class containing all the thresholds and timestamps for a noise""" + name: str + # match_pattern: MatchPatternCallable # mypy bug + duration: float + throttles: dict[str, float] + lowest_power_thresholds: list[float] + labels: frozenset[str] + + # This graceperiod is purely used to dampen the effects of a noises probability getting more unstable over time with the current model + graceperiod_length: float + detection_after: float + timestamps: NoiseTimestamps + + def __init__(self, name: str, labels: list[str], match_pattern: MatchPatternCallable, lowest_power_thresholds: list[float], throttles: dict[str, float], detection_after: float, graceperiod_length: float): + self.name = name + self.match_pattern = match_pattern + self.lowest_power_thresholds = lowest_power_thresholds + self.detection_after = detection_after + self.graceperiod_length = graceperiod_length + self.throttles = throttles + self.duration = 0 + self.labels = frozenset(labels) + self.timestamps = NoiseTimestamps() + + def is_active(self, time) -> bool: + """Check if a current noise is active""" + return self.timestamps.throttled_until < time + + def detect(self, frame: ParrotFrame) -> bool: + """Matches the pattern against the last N raw frames of the model classifier""" + grace_detected = False + detected = False + if self.is_active(frame.ts): + if self.match_pattern(self, frame, self.timestamps.graceperiod_until): + self.timestamps.duration_start = self.timestamps.duration_start if self.timestamps.duration_start > 0 else frame.ts + grace_detected = True + + # If there is a duration threshold, wait to activate until the duration has passed before marking the pattern as detected + if (self.timestamps.duration_start + self.detection_after) <= frame.ts: + detected = True + self.timestamps.last_detected_at = frame.ts + self.timestamps.graceperiod_until = frame.ts + self.graceperiod_length + self.duration = frame.ts - self.timestamps.duration_start + + # Reset graceperiod if the detection did not match + if grace_detected == False: + self.timestamps.graceperiod_until = 0 + self.duration = 0 + + # Reset the duration if the graceperiod has ended + if self.timestamps.duration_start > 0 and detected == False and grace_detected == False and self.timestamps.graceperiod_until < (frame.ts + self.graceperiod_length): + self.timestamps.duration_start = 0 + self.duration = 0 + + return detected + + def reset_timestamps(self): + """Reset all the activation timeouts""" + self.timestamps.graceperiod_until = 0 + self.timestamps.duration_start = 0 + self.duration = 0 + + def throttle(self, throttle_until: float, throttle_at: float): + """Throttle the detection of this pattern until the timestamp is passed if the throttle is higher than the highest current throttle""" + if throttle_until > self.timestamps.throttled_until: + self.timestamps.throttled_at = throttle_at + self.timestamps.throttled_until = throttle_until + self.timestamps.graceperiod_until = 0 + + def get_throttles(self) -> dict[str, float]: + """Returns a dict of all the patterns to throttle after this pattern has been detected""" + return self.throttles + + def get_current_lowest_power_threshold(self, time: float) -> float: + """Retrieve the lowest power threshold to aid in determining when to skip forward passes""" + return self.lowest_power_thresholds[1] if time < self.timestamps.graceperiod_until else self.lowest_power_thresholds[0] + +class PatternBuilder: + """Class that builds and validates the patterns to make sure they have the right syntax""" + possible_thresholds = frozenset(['>power', '>f0', '>f1', '>f2', '>probability', '>ratio', ' Optional[NoisePattern]: + """Builds a valid pattern or skips it in case the pattern is invalid""" + for key in pattern: + if key not in self.possible_keys: + logging.warning(f"[parrot] unknown key {repr(key)}") + + if 'sounds' not in pattern or len(pattern['sounds']) == 0: + logging.error(f"[parrot] skipping noise {repr(name)}: No sounds defined.") + return None + + for key in pattern['threshold']: + if key not in self.possible_thresholds: + logging.warning(f"[parrot] unknown threshold key: {repr(key)}") + detection_calls = self.generate_matching_functions(pattern['threshold'], pattern['sounds']) + + if 'grace_threshold' in pattern: + for key in pattern['grace_threshold']: + if key not in self.possible_thresholds: + logging.warning("[parrot] unknown grace threshold key: {repr(key)}") + graceperiod_detection_calls = self.generate_matching_functions(pattern['grace_threshold'], pattern['sounds']) + else: + graceperiod_detection_calls = copy(detection_calls) + + # Calculate the lowest power thresholds - These are used for optimisation purposes + # By default set the threshold at 20 to prevent continuous recognition on silence + lowest_power_thresholds: list[float] = [20, 0] + if '>power' in pattern['threshold']: + lowest_power_thresholds[0] = pattern['threshold']['>power'] + if 'grace_threshold' in pattern and '>power' in pattern['grace_threshold']: + lowest_power_thresholds[1] = pattern['grace_threshold']['>power'] + + grace_period = pattern['graceperiod'] if 'graceperiod' in pattern else 0 + detection_after = pattern['detect_after'] if 'detect_after' in pattern else 0 + + def match_pattern(self, frame: ParrotFrame, graceperiod_until: float): + return self.detect_all(frame, graceperiod_detection_calls) if frame.ts < graceperiod_until else self.detect_all(frame, detection_calls) + + throttles = {} + if 'throttle' in pattern: + if name not in pattern['throttle']: + pattern['throttle'][name] = 0 + throttles = pattern['throttle'] + + return NoisePattern(name, pattern['sounds'], match_pattern, lowest_power_thresholds, throttles, detection_after, grace_period) + + def generate_matching_functions(self, thresholds, sounds): + """Generate noise matching functions""" + detection_calls = [] + + if '>probability' in thresholds: + detection_calls.append( lambda self, frame, threshold=thresholds['>probability'], sounds=sounds: sum( frame.classes[sound] for sound in sounds) >= threshold ) + if '>power' in thresholds: + detection_calls.append( lambda self, frame, threshold=thresholds['>power']: frame.power >= threshold ) + if '>ratio' in thresholds and len(sounds) > 1: + detection_calls.append( lambda self, frame, threshold=thresholds['>ratio'], sounds=sounds: ( frame.classes[sounds[0]] / frame.classes[sounds[1]] >= threshold ) ) + if '>f0' in thresholds: + detection_calls.append( lambda self, frame, threshold=thresholds['>f0']: frame.f0 >= threshold ) + if '>f1' in thresholds: + detection_calls.append( lambda self, frame, threshold=thresholds['>f1']: frame.f1 >= threshold ) + if '>f2' in thresholds: + detection_calls.append( lambda self, frame, threshold=thresholds['>f2']: frame.f2 >= threshold ) + + # Lower than matches + if ' 1: + detection_calls.append( lambda self, frame, threshold=thresholds[' None: + patterns_to_validate = self.load_patterns(self.pattern_path, classes) + # discard invalid patterns + invalid_patterns: set[str] = set() + patterns: dict[str, NoisePattern] = {} + for pattern in patterns_to_validate: + # NOTE: could make a note of the actual invalid labels, from the result of this set subtraction + if len(pattern.labels - classes) > 0: + invalid_patterns.add(pattern.name) + events.write("parrot", f"invalid: {pattern.name}") + else: + patterns[pattern.name] = pattern + events.write("parrot", f"added: {pattern.name}") + self.patterns = patterns + for name in invalid_patterns: + logging.warning(f"[parrot] pattern {repr(name)} contains invalid labels and will not be used.") + if invalid_patterns: + class_names = ', '.join(classes) + logging.warning(f"[parrot] use one of the following labels: {class_names}") + + def load_patterns(self, pattern_path: str, classes: set[str]) -> list[NoisePattern]: + """Load the patterns""" + try: + json_patterns = json.loads(resource.read(pattern_path)) + pattern_builder = PatternBuilder() + patterns: list[NoisePattern] = [] + for key, config in json_patterns.items(): + pattern = pattern_builder.build(key, config) + if pattern is not None: + patterns.append(pattern) + return patterns + except Exception: + log_exception(f"[parrot] invalid pattern file: {pattern_path}") + return [] + + def calculate_silence_threshold(self) -> float: + """Calculate the power threshold needed before we need to do noise recognition given the currently active noises""" + current_time = time.perf_counter() + inactive_power_threshold = 10000000 + thresholds = [] + for pattern in self.patterns.values(): + if pattern.is_active(current_time): + thresholds.append(pattern.get_current_lowest_power_threshold(current_time)) + + # If the debug is on, drop the silence threshold to make it easier to view model output for debugging + if self.debug: + thresholds.append(10) + + # If no noises are active - skip all noise recognition and save some CPU + if len(thresholds) == 0: + return inactive_power_threshold + else: + return min(thresholds) + + def throttle_patterns(self, throttles_s: dict[str, float], current_time: float): + """Throttles the given pattern names until the matching milliseconds are passed""" + for pattern_name in throttles_s: + pattern = self.patterns.get(pattern_name) + if pattern is not None: + pattern.throttle(current_time + throttles_s[pattern_name], current_time) + + def power_threshold(self, power: float) -> bool: + silence_power_threshold = self.calculate_silence_threshold() + + # Reset all the duration timeouts if we are transitioning to silence + should_forwardpass = power > silence_power_threshold + if self.last_frame_was_forwardpass and not should_forwardpass: + for pattern in self.patterns.values(): + pattern.reset_timestamps() + + self.last_frame_was_forwardpass = should_forwardpass + return should_forwardpass + + def pattern_match(self, frame: ParrotFrame) -> set[str]: + if self.debug: + winner_label, winner_prob = next(iter(frame.classes.items())) + events.write('parrot', f"predict {winner_label} {winner_prob * 100:.2f}% pow={frame.power:.2f} f0={frame.f0:.3f} f1={frame.f1:.3f} f2={frame.f2:.3f}") + + active: set[str] = set() + for pattern in self.patterns.values(): + if pattern.detect(frame): + active.add(pattern.name) + self.throttle_patterns(pattern.get_throttles(), frame.ts) + + return active + +parrot_delegate = Delegate(pattern_path, debug=False) +system = ParrotSystem(model_path, parrot_delegate) diff --git a/plugin/repeater/repeater.talon b/plugin/repeater/repeater.talon index f97f128f87..eb2a75fe41 100644 --- a/plugin/repeater/repeater.talon +++ b/plugin/repeater/repeater.talon @@ -6,3 +6,5 @@ repeat that [times]: core.repeat_command(number_small) (repeat phrase | again) [ times]: core.repeat_partial_phrase(number_small or 1) + +parrot(cluck): core.repeat_phrase(1) From 3af7a473f5cdf696811493a140bc1aeefd8c15e3 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 7 Jan 2025 10:47:16 -0600 Subject: [PATCH 35/41] 2024-09-05 --- apps/git/git.talon | 20 +++++++++++++++----- apps/vscode/my_vscode.talon | 22 +++++++++++++++++++++- settings.talon | 2 +- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/apps/git/git.talon b/apps/git/git.talon index 9ba5687388..8178de5591 100644 --- a/apps/git/git.talon +++ b/apps/git/git.talon @@ -15,11 +15,21 @@ git stash [push] [] message []: # Optimistic execution for frequently used commands that are harmless (don't # change repository or index state). -git status$: "git status\n" -git add patch$: "git add --patch\n" -git show head$: "git show HEAD\n" -git diff$: "git diff\n" -git diff (cached | cashed)$: "git diff --cached\n" +git status$: + "git status" + key(enter) +git add patch$: +"git add --patch" + key(enter) +git show head$: + "git show HEAD" + key(enter) +git diff$: + "git diff" + key(enter) +git diff (cached | cashed)$: + "git diff --cached" + key(enter) # Convenience git clone clipboard: diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index c45284dc80..485851e202 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -1,4 +1,13 @@ #custom vscode commands go here +# app: vscode +# - +# tag(): user.find_and_replace +# tag(): user.line_commands +# tag(): user.multiple_cursors +# tag(): user.snippets +# tag(): user.splits +# tag(): user.tabs +# tag(): user.cursorless_experimental_snippets app: vscode - tag(): user.find_and_replace @@ -7,7 +16,6 @@ tag(): user.multiple_cursors tag(): user.snippets tag(): user.splits tag(): user.tabs -tag(): user.cursorless_experimental_snippets file (search|forage): user.vscode("workbench.action.findInFiles") @@ -82,3 +90,15 @@ bookmark toggle label: key(alt-cmd-h) (go to | follow) link: user.vscode('editor.action.openLink') + +key(ctrl+d): + user.disable_talon_mic() + +# this adds the spoken forms `scout all`, `scout all say `, `scout all poke` (e.g. paste) +# the cursorless form `scout all ` still works! +scout all: + app.notify("scout all") + user.vscode("workbench.action.findInFiles") + +scout: + user.vscode("actions.find") diff --git a/settings.talon b/settings.talon index e21f01ee4e..cb4b08c123 100644 --- a/settings.talon +++ b/settings.talon @@ -83,7 +83,7 @@ settings(): # Uncomment to insert text longer than 10 characters (customizable) by pasting from # the clipboard. This is often faster than typing. - # user.paste_to_insert_threshold = 10 + user.paste_to_insert_threshold = 10 # Uncomment to enable context-sensitive dictation. This determines how to format # (capitalize, space) dictation-mode speech by selecting & copying surrounding text From 7ca43c3068f86115fc117b2e7900d7ed0087d1f4 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 7 Jan 2025 10:48:47 -0600 Subject: [PATCH 36/41] automated update to tags, and add cursorless_use_community_snippets --- apps/git/git.talon | 2 +- apps/vscode/my_vscode.talon | 2 -- apps/vscode/my_vscode_mac.talon | 3 +-- apps/vscode/my_vscode_win.talon | 1 - settings.talon | 2 +- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/git/git.talon b/apps/git/git.talon index 8178de5591..af9f909c1b 100644 --- a/apps/git/git.talon +++ b/apps/git/git.talon @@ -19,7 +19,7 @@ git status$: "git status" key(enter) git add patch$: -"git add --patch" + "git add --patch" key(enter) git show head$: "git show HEAD" diff --git a/apps/vscode/my_vscode.talon b/apps/vscode/my_vscode.talon index 485851e202..9443c5d41c 100644 --- a/apps/vscode/my_vscode.talon +++ b/apps/vscode/my_vscode.talon @@ -4,7 +4,6 @@ # tag(): user.find_and_replace # tag(): user.line_commands # tag(): user.multiple_cursors -# tag(): user.snippets # tag(): user.splits # tag(): user.tabs # tag(): user.cursorless_experimental_snippets @@ -13,7 +12,6 @@ app: vscode tag(): user.find_and_replace tag(): user.line_commands tag(): user.multiple_cursors -tag(): user.snippets tag(): user.splits tag(): user.tabs diff --git a/apps/vscode/my_vscode_mac.talon b/apps/vscode/my_vscode_mac.talon index 3bb6dcbd3c..c7c95cb8f6 100644 --- a/apps/vscode/my_vscode_mac.talon +++ b/apps/vscode/my_vscode_mac.talon @@ -5,11 +5,10 @@ os: mac tag(): user.find_and_replace tag(): user.line_commands tag(): user.multiple_cursors -tag(): user.snippets tag(): user.splits tag(): user.tabs -# note: change vscode preferences window title to `[${rootName}] ${activeEditorShort}${separator}${profileName}` +# note: change vscode preferences window title to `[${rootName}] ${activeEditorShort}${separator}${activeFolderMedium}${separator}${activeRepositoryBranchName}${separator}focus:[${focusedView}]` # so that project name is first and inside []. switch talon: key('ctrl-w') diff --git a/apps/vscode/my_vscode_win.talon b/apps/vscode/my_vscode_win.talon index 9349bcf5c6..9b4790347e 100644 --- a/apps/vscode/my_vscode_win.talon +++ b/apps/vscode/my_vscode_win.talon @@ -5,7 +5,6 @@ os: windows tag(): user.find_and_replace tag(): user.line_commands tag(): user.multiple_cursors -tag(): user.snippets tag(): user.splits tag(): user.tabs diff --git a/settings.talon b/settings.talon index cb4b08c123..6cb684207b 100644 --- a/settings.talon +++ b/settings.talon @@ -125,4 +125,4 @@ tag(): user.pop_twice_to_repeat # Uncomment the below to enable the experimental window layout commands # defined in window_layout.talon -# tag(): user.experimental_window_layout +tag(): user.experimental_window_layout From 51bfbe7e639ec2ecfe5a7a4809191fded9897acf Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 7 Jan 2025 09:16:52 -0600 Subject: [PATCH 37/41] add switch foam and switch view for vscode --- apps/vscode/my_vscode_mac.talon | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/vscode/my_vscode_mac.talon b/apps/vscode/my_vscode_mac.talon index c7c95cb8f6..0eab96d356 100644 --- a/apps/vscode/my_vscode_mac.talon +++ b/apps/vscode/my_vscode_mac.talon @@ -22,12 +22,24 @@ switch dendron: "dendron" key('enter') +switch foam: + key('ctrl-w') + sleep(100ms) + "foam" + key('enter') + switch user: key('ctrl-w') sleep(100ms) "user" key('enter') +switch view: + key('ctrl-w') + sleep(100ms) + "doximity-client-vue" + key('enter') + # bar (copilot | chat): # user.vscode("workbench.panel.chat.view.copilot.focus") From 523d202b0a36c197a1a5e4c45c426e11eda77771 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Fri, 28 Mar 2025 09:43:45 -0500 Subject: [PATCH 38/41] 2025-03-28 --- apps/vscode/vscode.talon | 2 +- core/system_paths-Gregs-MacBook-Pro.talon-list | 16 ++++++++++++++++ lang/markdown/markdown.talon | 6 ++++-- 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 core/system_paths-Gregs-MacBook-Pro.talon-list diff --git a/apps/vscode/vscode.talon b/apps/vscode/vscode.talon index 09215e0f01..afa24ffe72 100644 --- a/apps/vscode/vscode.talon +++ b/apps/vscode/vscode.talon @@ -22,7 +22,7 @@ bar extensions: user.vscode("workbench.view.extensions") bar outline: user.vscode("outline.focus") bar run: user.vscode("workbench.view.debug") bar search: user.vscode("workbench.view.search") -bar source: user.vscode("workbench.view.scm") +bar (source|git) [control]: user.vscode("workbench.view.scm") bar test: user.vscode("workbench.view.testing.focus") bar switch: user.vscode("workbench.action.toggleSidebarVisibility") diff --git a/core/system_paths-Gregs-MacBook-Pro.talon-list b/core/system_paths-Gregs-MacBook-Pro.talon-list new file mode 100644 index 0000000000..20e3a42b7b --- /dev/null +++ b/core/system_paths-Gregs-MacBook-Pro.talon-list @@ -0,0 +1,16 @@ +list: user.system_paths +hostname: Gregs-MacBook-Pro +- +user: /Users/gregh +desktop: /Users/gregh/Desktop +desk: /Users/gregh/Desktop +documents: /Users/gregh/Documents +docks: /Users/gregh/Documents +downloads: /Users/gregh/Downloads +music: /Users/gregh/Music +pictures: /Users/gregh/Pictures +videos: /Users/gregh/Videos +talon home: /Users/gregh/.talon +talon recordings: /Users/gregh/.talon/recordings +talon user: /Users/gregh/.talon/user +home: /Users/gregh diff --git a/lang/markdown/markdown.talon b/lang/markdown/markdown.talon index c5f843b783..5e744ccedb 100644 --- a/lang/markdown/markdown.talon +++ b/lang/markdown/markdown.talon @@ -43,8 +43,10 @@ list six: link: user.insert_snippet_by_name("link") -# toggle preview is specific to dendron extension -(toggle|togo) preview: key('super-ctrl-p') +(toggle|togo|show|switch) preview: + key('cmd-k') + sleep(200ms) + key('v') task []: edit.line_start() From 5d12f5944ecc1e0556ecca70c7a7cb5875e422bc Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Mon, 21 Jul 2025 15:45:27 -0500 Subject: [PATCH 39/41] 2025-07-21 remove pop to wake, add settings/*.csv files --- core/modes/sleep_mode.talon | 3 + settings/abbreviations.csv | 437 ++++++++++++++++++++++++++++++++++ settings/file_extensions.csv | 49 ++++ settings/words_to_replace.csv | 11 + 4 files changed, 500 insertions(+) create mode 100644 settings/abbreviations.csv create mode 100644 settings/file_extensions.csv create mode 100644 settings/words_to_replace.csv diff --git a/core/modes/sleep_mode.talon b/core/modes/sleep_mode.talon index 64a879cea3..9e04bbbe35 100644 --- a/core/modes/sleep_mode.talon +++ b/core/modes/sleep_mode.talon @@ -34,3 +34,6 @@ settings(): user.mouse_wake() user.history_enable() user.talon_mode() + +# parrot(cluck): # pop to wake Talon, future use double pop or something due to false positives. +# speech.enable() diff --git a/settings/abbreviations.csv b/settings/abbreviations.csv new file mode 100644 index 0000000000..44c14cad43 --- /dev/null +++ b/settings/abbreviations.csv @@ -0,0 +1,437 @@ +Abbreviation,Spoken Form +jpg,J peg +abbr,abbreviate +abrt,abort +ack,acknowledge +addr,address +addrs,addresses +admin,administrator +admins,administrators +adv,advance +adv,advanced +ab,alberta +alloc,allocate +alt,alternative +appl,apple +app,application +apps,applications +arg,argument +args,arguments +afaict,as far as i can tell +afaik,as far as i know +asm,assembly +async,asynchronous +atm,at the moment +attr,attribute +attrs,attributes +auth,authenticate +authn,authentication +authz,authorization +augroup,auto group +avg,average +afk,away from keyboard +bkp,backup +brb,be right back +bin,binary +blk,block +bool,boolean +bot,bottom +bp,break point +bps,break points +bc,british columbia +buf,buffer +btn,button +btw,by the way +calc,calculate +calc,calculator +cam,camera +ca,canada +cm,centimeter +chr,char +char,character +chk,check +chld,child +cn,china +cls,class +cli,client +col,column +cmd,command +cmds,commands +cmt,comment +comm,communication +comms,communications +cmp,compare +cond,condition +conf,conference +cfg,config +config,configuration +configs,configurations +conn,connection +const,constant +contrib,contribute +ctor,constructor +ctx,context +cfg,control flow graph +ctrl,control +coord,coordinate +coords,coordinates +cpy,copy +cnt,count +ctr,counter +cred,credential +creds,credentials +xref,cross reference +xrefs,cross references +ctl,cuddle +cur,current +qt,cute +db,database +yyyy-mm-dd,date format +deb,debian +dbg,debug +dec,decimal +decl,declaration +decl,declare +dec,decode +dec,decrement +def,define +def,definition +deg,degree +del,delete +dep,depend +deps,depends +desc,description +dst,dest +dest,destination +dev,develop +dev,development +dev,device +diag,diagnostic +dict,dictation +dict,dictionary +dir,direction +dirs,directories +dir,directory +disp,display +dist,distance +dist,distribution +doc,document +docs,documents +ing,doing +deque,double ended queue +dbl,double +dup,dupe +dup,duplicate +dyn,dynamic +elast,elastic +elem,element +elems,elements +enc,encode +eod,end of day +eom,end of month +eoq,end of quarter +eow,end of week +eoy,end of year +ent,entry +enum,enumerate +env,environment +err,error +esc,escape +etc,etcetera +eth,ethernet +eval,evaluate +ex,example +exc,exception +exe,executable +exes,executables +exec,execute +exp,experience +exp,exponent +expr,expression +exprs,expressions +ext,extend +ext,extension +extern,external +id,eye dent +ioctl,eye octal +i3,eye three +feat,feature +fs,file system +fp,fingerprint +fwiw,for what +fmt,format +fgt,fortigate +fw,framework +freq,frequency +func,function +funcs,functions +lol,funny +fzy,fuzzy +gen,generate +gen,generic +hw,hardware +hdr,header +helo,hello +hist,history +http,hypertext +id,identity +ign,ignore +img,image +impl,implement +iat,import address table +iat,import table +irl,in real life +inc,increment +idx,index +info,information +infra,infrastructure +init,initialize +init,initializer +ino,inode +ins,insert +inst,instance +insn,instruction +int,integer +interp,interpreter +int,interrupt +iter,iterate +json,jason +json5,jason five +jar,java archive +js,javascript +gif,jiff +journalctl,journal cuttle +jmp,jump +jit,just in time +kk,kay +krnl,kernel +keyctl,key cuttle +kbd,keyboard +kwargs,keyword arguments +kw,keyword +kg,kilogram +km,kilometer +lang,language +lol,laugh out loud +len,length +libc,lib see +lib,library +lsp,lisp +lgtm,looks good to me +smtp,mail +mk,make +mgmt,management +mgr,manager +mb,manitoba +md,markdown +max,maximum +mem,memory +msg,message +msf,meta sploit framework +msf,meta sploit +mic,microphone +mid,middle +mg,milligram +ms,millisecond +mvp,minimum viable product +min,minimum +misc,miscellaneous +mod,modify +mod,module +mods,modules +mon,monitor +mnt,mount +multi,multiple +musl,muscle +mut,mutate +ns,nano second +nvim,neo vim +nb,new brunswick +ns,nova scotia +num,number +nums,numbers +obj,object +objs,objects +off,offset +offs,offsets +ok,okay +on,ontario +os,operating system +op,operation +ops,operations +opt,option +opts,options +orig,original +oob,out of bounds +pkgbuild,package build +pkg,package +pkgs,packages +pkt,packet +pkts,packets +param,parameter +params,parameters +passwd,password +perf,performance +phys,physical +paddr,physical address +pic,pick +ps,pico second +py,pie +png,ping +px,pixel +pt,point +ptr,pointer +ptrs,pointers +pwn,pone +pic,position independent code +pie,position independent executable +pos,position +pwndbg,pound bag +pref,preference +prefs,preferences +prev,previous +priv,private +proc,process +cpu,processor +prod,production +prog,program +progs,programs +props,properties +prop,property +proto,protocol +protobuf,protocol buffers +pub,public +py,python +qc,quebec +qs,query string +rad,radian +rand,random +rwx,read right ex +rcpt,receipt +recv,receive +rec,record +rec,recording +rect,rectangle +refcnt,ref count +ref,reference +refs,references +reg,register +regs,registers +reg,registery +regex,regular expression +regex,regular expressions +rm,remove +repl,repel +rsi,repetitive strain injury +repo,repository +repr,represent +repr,representation +req,request +reqs,requests +rsrcs,resources +resp,response +res,result +ret,return +rev,revision +rnd,round +rb,ruby +rs,rust +smbd,samba D +smb,samba +sk,saskatchewan +sched,schedule +sched,scheduler +scr,screen +scsi,scuzzy +C,see +seg,segment +sel,select +sem,semaphore +snd,send +sql,sequel +seq,sequence +sp,service pack +sid,session id +sh,shell +sc,shellcode +sig,signal +sz,size +[...],snipped +sum,some +src,source +srcs,sources +spec,special +spec,specific +spec,specification +spec,specify +stderr,standard error +stdin,standard in +stdout,standard out +std,standard +sod,start of day +som,start of month +soq,start of quarter +sow,start of week +soy,start of year +stmt,statement +stat,statistic +stats,statistics +str,string +struct,structure +structs,structures +sym,symbol +symlink,symbolic link +syms,symbols +sync,synchronize +sync,synchronous +sysctl,sys cuttle +syscall,system call +systemctl,system cuddle +sys,system +toc,table of contents +tbl,table +tw,taiwan +toc,talk +tech,technology +tmp,temp +temp,temperature +tmp,temporary +term,terminal +txt,text +hh:mm:ss,time format +toctou,time of check time of use +ttl,time to live +tok,token +txn,transaction +ts,typescript +ulti,ultimate +uuid,unique id +unk,unknown +uid,user id +usr,user +utils,utilities +util,utility +val,value +vals,values +var,variable +vars,variables +vec,vector +vrfy,verify +ver,version +vs,versus +vid,video +vids,videos +vm,virtual machine +virt,virtual +vaddr,virtual address +msvc,visual studio +vis,visual +vol,volume +vuln,vulnerable +wav,wave +www,web +wtf,what the fuck +wnd,wind +win,window +ntoskrnl,windows kernel +wip,work in progress diff --git a/settings/file_extensions.csv b/settings/file_extensions.csv new file mode 100644 index 0000000000..8045d27daa --- /dev/null +++ b/settings/file_extensions.csv @@ -0,0 +1,49 @@ +File extension,Name +.py,dot pie +.ex,dot elixir +.talon,dot talon +.md,dot mark down +.sh,dot shell +.vim,dot vim +.c,dot see +.cs,dot see sharp +.com,dot com +.net,dot net +.org,dot org +.us,dot us +.us,dot U S +.co.uk,dot co dot UK +.exe,dot exe +.bin,dot bin +.bin,dot bend +.json,dot jason +.json,dot jay son +.js,dot J S +.js,dot java script +.ts,dot TS +.ts,dot type script +.csv,dot csv +.csv,totssv +.csv,tot csv +.csv,dot cassie +.txt,dot text +.jl,dot julia +.jl,dot J L +.html,dot html +.css,dot css +.sass,dot sass +.svg,dot svg +.png,dot png +.wav,dot wave +.flac,dot flack +.doc,dot doc +.docx,dot doc x +.pdf,dot pdf +.tar,dot tar +.gz,dot g z +.gzip,dot g zip +.zip,dot zip +.toml,dot toml +.java,dot java +.class,dot class +.log,dot log diff --git a/settings/words_to_replace.csv b/settings/words_to_replace.csv new file mode 100644 index 0000000000..436af6f564 --- /dev/null +++ b/settings/words_to_replace.csv @@ -0,0 +1,11 @@ +Replacement,Original +January,january +February,february +April,april +June,june +July,july +August,august +September,september +October,october +November,november +December,december From f4c548879ad0f89b198bb028e636d91bdb4d0357 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Mon, 21 Jul 2025 17:08:08 -0500 Subject: [PATCH 40/41] add slack commands --- apps/slack/slack.talon | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/apps/slack/slack.talon b/apps/slack/slack.talon index 6cbd705b11..a10121c6a4 100644 --- a/apps/slack/slack.talon +++ b/apps/slack/slack.talon @@ -8,6 +8,9 @@ workspace : user.slack_open_workspace(number) # Channel (slack | lack) [channel] info: user.slack_show_channel_info() focus (move | next): key(ctrl-`) +# mac +channel (next|down): key(alt-down) +channel (previous|up): key(alt-up) (section | zone) [next]: user.slack_section_next() (section | zone) (previous | last): user.slack_section_previous() (slack | lack) (starred [items] | stars): user.slack_open_starred_items() @@ -25,6 +28,12 @@ add line: key(shift-enter) (element | bit) [next]: key(tab) (element | bit) (previous | last): key(shift-tab) +(slack | lack) jump: key(cmd-k) +(slack | lack) jump to []: + key(cmd-k) + sleep(100ms) + {phrase} +(slack | lack) home: key(ctrl-1) (slack | lack) (my stuff | activity): user.slack_open_activity() (slack | lack) directory: user.slack_open_directory() @@ -43,7 +52,8 @@ bold: user.slack_toggle_bold() (strike | strikethrough): user.slack_toggle_strikethrough() (slack | lack) snippet: user.slack_create_snippet() # Calls -(slack | lack) huddle: user.slack_huddle() +# (slack | lack) huddle: user.slack_huddle() +(slack | lack) (later): key(ctrl-4) ([toggle] mute | unmute): key(m) (slack | lack) ([toggle] video): key(v) (slack | lack) invite: key(a) @@ -53,6 +63,10 @@ emote : ":{text}:" (slack | lack) shortcuts: user.slack_open_keyboard_shortcuts() toggle left sidebar: user.slack_toggle_left_sidebar() toggle right sidebar: user.slack_toggle_right_sidebar() +toggle left [sidebar | bar]: user.slack_toggle_left_sidebar() +toggle right [sidebar | bar]: user.slack_toggle_right_sidebar() +bar switch [left]: user.slack_toggle_left_sidebar() +bar switch right: user.slack_toggle_right_sidebar() # DEPRECATED (move | next) focus: @@ -70,3 +84,6 @@ toggle right sidebar: user.slack_toggle_right_sidebar() (previous | last) (element | bit): app.notify("please use the voice command 'element last' instead of 'last element'") key(shift-tab) + +# not sure if this works correctly... +format message: key(ctrl-shift-f) From c369dcb5132d2c22742b5bcf47c88b8c1d21beb3 Mon Sep 17 00:00:00 2001 From: Greg Houston Date: Tue, 9 Dec 2025 08:43:02 -0600 Subject: [PATCH 41/41] 2025-12-09 various small changes --- apps/warp/warp.talon | 9 +++++++++ core/modes/code_languages.py | 4 ++-- core/modes/language_modes.talon | 6 +++--- ...stem_paths-Gregorys-DoxBook-Pro-25.talon-list | 16 ++++++++++++++++ plugin/gamepad/gamepad.talon | 2 +- 5 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 core/system_paths-Gregorys-DoxBook-Pro-25.talon-list diff --git a/apps/warp/warp.talon b/apps/warp/warp.talon index 02f1a0c680..9c8ce05dca 100644 --- a/apps/warp/warp.talon +++ b/apps/warp/warp.talon @@ -30,3 +30,12 @@ last one: key(cmd-l) key(up) key(enter) + +# note, this shortcut will leave a charcode when looking at logs +scroll bottom: + key(cmd-shift-down) + +find puts: + key(cmd-f) + ">>>>>" + key(enter) diff --git a/core/modes/code_languages.py b/core/modes/code_languages.py index 7b5bbb62ed..d35cf6094b 100644 --- a/core/modes/code_languages.py +++ b/core/modes/code_languages.py @@ -29,7 +29,7 @@ def __init__(self, id: str, spoken_form: str | list[str], extensions: list[str]) Language("gdb", "g d b", ["gdb"]), Language("go", ["go lang", "go language"], ["go"]), Language("java", "java", ["java"]), - Language("javascript", "java script", ["js"]), + Language("javascript", "java script", ["js", "vue"]), Language("javascriptreact", "java script react", ["jsx"]), # Language("jsonl", "json lines", ["jsonl"]), Language("kotlin", "kotlin", ["kt"]), @@ -60,7 +60,7 @@ def __init__(self, id: str, spoken_form: str | list[str], extensions: list[str]) # These languages doesn't actually have a language mode, but we do have snippets. Language("cpp", "see plus plus", ["cpp", "hpp"]), Language("csv", "csv", ["csv"]), - Language("html", "html", ["html"]), + Language("html", ["html", "web"], ["html"]), Language("json", "json", ["json"]), Language("shellscript", "shell script", ["sh"]), Language("xml", "xml", ["xml"]), diff --git a/core/modes/language_modes.talon b/core/modes/language_modes.talon index ac916b9762..33f7dce66e 100644 --- a/core/modes/language_modes.talon +++ b/core/modes/language_modes.talon @@ -1,3 +1,3 @@ -^force {user.language_mode}$: user.code_set_language_mode(language_mode) -show [forced] language mode: user.code_show_forced_language_mode() -^clear language mode$: user.code_clear_language_mode() +^force [language] {user.language_mode}$: user.code_set_language_mode(language_mode) +show [forced] language [mode]: user.code_show_forced_language_mode() +^clear language [mode]$: user.code_clear_language_mode() diff --git a/core/system_paths-Gregorys-DoxBook-Pro-25.talon-list b/core/system_paths-Gregorys-DoxBook-Pro-25.talon-list new file mode 100644 index 0000000000..c894abf988 --- /dev/null +++ b/core/system_paths-Gregorys-DoxBook-Pro-25.talon-list @@ -0,0 +1,16 @@ +list: user.system_paths +hostname: Gregorys-DoxBook-Pro-25 +- +user: /Users/gregh +desktop: /Users/gregh/Desktop +desk: /Users/gregh/Desktop +documents: /Users/gregh/Documents +docks: /Users/gregh/Documents +downloads: /Users/gregh/Downloads +music: /Users/gregh/Music +pictures: /Users/gregh/Pictures +videos: /Users/gregh/Videos +talon home: /Users/gregh/.talon +talon recordings: /Users/gregh/.talon/recordings +talon user: /Users/gregh/.talon/user +home: /Users/gregh diff --git a/plugin/gamepad/gamepad.talon b/plugin/gamepad/gamepad.talon index 2f97ac2a06..a7e4f41a5e 100644 --- a/plugin/gamepad/gamepad.talon +++ b/plugin/gamepad/gamepad.talon @@ -46,4 +46,4 @@ gamepad(r2:repeat): user.gamepad_trigger_right(value) # Analog thumb sticks gamepad(left_xy:repeat): user.gamepad_stick_left(x, y*-1) -gamepad(right_xy:repeat): user.gamepad_stick_right(x, y*-1) +# gamepad(right_xy:repeat): user.gamepad_stick_right(x, y*-1)