From f45372364f2973507102c4b3ff62aaf49286180c Mon Sep 17 00:00:00 2001 From: Jacob Egner Date: Fri, 23 Jun 2023 21:17:30 -0500 Subject: [PATCH 01/12] add {java, class, log} file extensions (#1202) Java developers. There are dozens of us, dozens! --- core/file_extension/file_extension.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/file_extension/file_extension.py b/core/file_extension/file_extension.py index 2bd7fa2f14..04a1c23ca2 100644 --- a/core/file_extension/file_extension.py +++ b/core/file_extension/file_extension.py @@ -50,6 +50,9 @@ "dot g zip": ".gzip", "dot zip": ".zip", "dot toml": ".toml", + "dot java": ".java", + "dot class": ".class", + "dot log": ".log", } file_extensions = get_list_from_csv( From a0c5b81b489ed9e6b7dbb28c9bc1f668b2db3459 Mon Sep 17 00:00:00 2001 From: Jacob Egner Date: Fri, 23 Jun 2023 21:42:39 -0500 Subject: [PATCH 02/12] add {open paste, open that, search engine paste} commands (#1207) These have been super useful for me. --- .../websites_and_search_engines.talon | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/websites_and_search_engines/websites_and_search_engines.talon b/core/websites_and_search_engines/websites_and_search_engines.talon index d30d3a639b..eab5887d32 100644 --- a/core/websites_and_search_engines/websites_and_search_engines.talon +++ b/core/websites_and_search_engines/websites_and_search_engines.talon @@ -1,6 +1,10 @@ open {user.website}: user.open_url(website) +open that: user.open_url(edit.selected_text()) +open paste: user.open_url(clip.text()) + {user.search_engine} hunt $: user.search_with_search_engine(search_engine, user.text) {user.search_engine} (that | this): text = edit.selected_text() user.search_with_search_engine(search_engine, text) +{user.search_engine} paste: user.search_with_search_engine(search_engine, clip.text()) From 609ed7a701e93c39d6e546e71f891385fd9d267b Mon Sep 17 00:00:00 2001 From: gband85 Date: Fri, 23 Jun 2023 22:03:51 -0500 Subject: [PATCH 03/12] add support for launching Linux apps (#1197) Added ability to launch Linux apps. Parses .desktop shortcut files for app launch commands. Correctly parses arguments and passes them to ui.launch. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- core/app_switcher/app_switcher.py | 51 ++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/core/app_switcher/app_switcher.py b/core/app_switcher/app_switcher.py index 7b9c9d8b05..ab85e9ebc0 100644 --- a/core/app_switcher/app_switcher.py +++ b/core/app_switcher/app_switcher.py @@ -1,4 +1,5 @@ import os +import shlex import subprocess import time from pathlib import Path @@ -33,6 +34,14 @@ "/System/Applications/Utilities", ] +linux_application_directories = [ + "/usr/share/applications", + "/usr/local/share/applications", + os.path.expandvars("/home/$USER/.local/share/applications"), + "/var/lib/flatpak/exports/share/applications", + "/var/lib/snapd/desktop/applications", +] + words_to_exclude = [ "zero", "one", @@ -162,6 +171,39 @@ def get_windows_apps(): return items +if app.platform == "linux": + import configparser + import re + + def get_linux_apps(): + # app shortcuts in program menu are contained in .desktop files. This function parses those files for the app name and command + items = {} + # find field codes in exec key with regex + # https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#exec-variables + args_pattern = re.compile(r" \%[UufFcik]") + for base in linux_application_directories: + if os.path.isdir(base): + for entry in os.scandir(base): + if entry.name.endswith(".desktop"): + config = configparser.ConfigParser(interpolation=None) + config.read(entry.path) + # only parse shortcuts that are not hidden + if config.has_option("Desktop Entry", "NoDisplay") == False: + name_key = config["Desktop Entry"]["Name"] + exec_key = config["Desktop Entry"]["Exec"] + # remove extra quotes from exec + if exec_key[0] == '"' and exec_key[-1] == '"': + exec_key = re.sub('"', "", exec_key) + # remove field codes and add full path if necessary + if exec_key[0] == "/": + items[name_key] = re.sub(args_pattern, "", exec_key) + else: + items[name_key] = "/usr/bin/" + re.sub( + args_pattern, "", exec_key + ) + return items + + @mod.capture(rule="{self.running}") # | )") def running_applications(m) -> str: "Returns a single application name" @@ -280,7 +322,10 @@ def switcher_focus_window(window: ui.Window): def switcher_launch(path: str): """Launch a new application by path (all OSes), or AppUserModel_ID path on Windows""" if app.platform != "windows": - ui.launch(path=path) + # separate command and arguments + cmd = shlex.split(path)[0] + args = shlex.split(path)[1:] + ui.launch(path=cmd, args=args) else: is_valid_path = False try: @@ -337,6 +382,10 @@ def update_launch_list(): elif app.platform == "windows": launch = get_windows_apps() + + elif app.platform == "linux": + launch = get_linux_apps() + # actions.user.talon_pretty_print(launch) ctx.lists["self.launch"] = actions.user.create_spoken_forms_from_map( From 82378cabfadfdb4375d3874338ff9264e3467196 Mon Sep 17 00:00:00 2001 From: Antonio Santos Date: Sat, 24 Jun 2023 05:27:53 +0200 Subject: [PATCH 04/12] Make the tmux modifier key configurable (#1218) Make it possible to configure the modifier key for the people that use alternative keybindings (like I do with `alt-a` :smile:). This pull request also updates how windows are switched to use the keybind and numbers from 0 to 9 if possible, for a slightly faster user experience. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- apps/tmux/tmux.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/tmux/tmux.py b/apps/tmux/tmux.py index aed2f012d2..53af8ed263 100644 --- a/apps/tmux/tmux.py +++ b/apps/tmux/tmux.py @@ -10,7 +10,7 @@ setting_tmux_prefix_key = mod.setting( "tmux_prefix_key", type=str, - default="b", + default="ctrl-b", desc="The key used to prefix all tmux commands", ) @@ -19,7 +19,7 @@ class TmuxActions: def tmux_prefix(): """press control and the configured tmux prefix key""" - actions.key(f"ctrl-{setting_tmux_prefix_key.get()}") + actions.key(f"{setting_tmux_prefix_key.get()}") def tmux_keybind(key: str): """press tmux prefix followed by a key bind""" @@ -60,7 +60,10 @@ def tab_previous(): @ctx.action_class("user") class UserActions: def tab_jump(number: int): - actions.user.tmux_execute_command(f"select-window -t {number}") + if number < 10: + actions.user.tmux_keybind(f"{number}") + else: + actions.user.tmux_execute_command(f"select-window -t {number}") def tab_close_wrapper(): actions.user.tmux_execute_command_with_confirmation( From 7cf33e29d086b6208ba222a1c8727d830ee579e0 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 24 Jun 2023 18:20:42 +0200 Subject: [PATCH 05/12] Added mode indicator (#1194) Will show different colors for sleep, dictation, mixed, command/other modes Screenshot 2023-05-13T18-04-21 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Michael Arntzenius Co-authored-by: Phil Cohen --- plugin/mode_indicator/README.md | 34 ++++ plugin/mode_indicator/images/command.png | Bin 0 -> 2960 bytes plugin/mode_indicator/images/dictation.png | Bin 0 -> 2916 bytes plugin/mode_indicator/images/mixed.png | Bin 0 -> 2863 bytes plugin/mode_indicator/images/other.png | Bin 0 -> 2293 bytes plugin/mode_indicator/images/sleep.png | Bin 0 -> 1835 bytes plugin/mode_indicator/mode_indicator.py | 192 +++++++++++++++++++++ plugin/mode_indicator/mode_indicator.talon | 23 +++ 8 files changed, 249 insertions(+) create mode 100644 plugin/mode_indicator/README.md create mode 100644 plugin/mode_indicator/images/command.png create mode 100644 plugin/mode_indicator/images/dictation.png create mode 100644 plugin/mode_indicator/images/mixed.png create mode 100644 plugin/mode_indicator/images/other.png create mode 100644 plugin/mode_indicator/images/sleep.png create mode 100644 plugin/mode_indicator/mode_indicator.py create mode 100644 plugin/mode_indicator/mode_indicator.talon diff --git a/plugin/mode_indicator/README.md b/plugin/mode_indicator/README.md new file mode 100644 index 0000000000..0f8d626058 --- /dev/null +++ b/plugin/mode_indicator/README.md @@ -0,0 +1,34 @@ +# Mode indicator + +Graphical indicator to show you which Talon mode your currently are in. Supports a lot of settings to move, resize and change colors. + +## Default colors + +Command mode + +![Command mode](./images/command.png) + +Dictation mode + +![Dictation mode](./images/dictation.png) + +Mixed mode + +![Mixed mode](./images/mixed.png) + +Sleep mode + +![Sleep mode](./images/sleep.png) + +Other modes + +![Others mode](./images/other.png) + +## Usage + +You can enable this by changing the following setting in `mode_indicator.talon`: +`user.mode_indicator_show = 1` + +## Demo + +[YouTube - Mode indicator demo](https://youtu.be/1lqtfM4vvH4) diff --git a/plugin/mode_indicator/images/command.png b/plugin/mode_indicator/images/command.png new file mode 100644 index 0000000000000000000000000000000000000000..a2495d943ce34b21f37f17baab598dc76bea38ec GIT binary patch literal 2960 zcmV;B3vcv^P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGqB>(^xB>_oN zB=7(L3l&L3K~!i%)tc*Xl*bju&)$4p-;HfTFaZikRZFELg|v~9R_z!5+_q9bRjO!H zrLCZ)q=}LcpamQVF1~DnPm zx7)RLyKO~LSfkOfot+)ezwS~_@u5knRI+NdYC}UqHZd__b8~YxIXP+NavrLbBE=<@ zd8m9V(>ovz(~xN5iWE!zXdPu4eVW3y?EW=pjYSho7e zfK7~z*zvh>JG(e%Cl{t{pjP#|N;wFD?8BBLB?1CE3XMi#AK$oRH$Pvp<<(8=Xr;9D zU#H`(5>WxJE3&NAwX!S%qnMc(w(o!MxLvw<$_W}8sCju=WE>_TM@9tLAmQp?zqF68 zeP!DsqgjX;0d0!_tOFR}MuBWK8Je#g>p0koh#4BJ*tE1@zKPIjB;B0 zVH9CCWR!AZy4^ObMeRk1LQRi7R^4B?1yYzH!%nd-YQh(6yG9 zLLpEp76DrGDY(+f67U841^5Vkv0S>HBE@aRK}=a>RI4Ssd~wl!e))pUOxA61pg%JD zqj8_$53b1)AfX{EXviE|B7tRKrK*&yTBU;buUWZLQM#tI*15{cN=KlL;&MfGYO8j; zb$Y&}t+k{&tP4x~^NoMmAFkc9CuOgWRL@@q?hb#7LEe9MTp=it1b@BWF z0Z;}7DLEGKT1|mCrPZbaLEZ+kDATjVPGUT-eZ_swpRV1pPrg{P^=I4GYGFM|sUD?o zB4Uf|xMRd8w6r9!0^A!j3kU~SVfHa!6+f9y0V@38{b__xpQ z*~faX;yhZW?#Tq358YR(>|4M+B!dL^x=1c-$Vz!xi5d;YY5l~4aW$>8{tb$no`ST85 z`8bdBhD-n*~a|w9w0e1PgfZa80{JTO@GwRU!W=gmc3hqAY+brYw=* zptB_a*hwKMkF)i62>OZV02|g2V<_eIo=&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H5ix%7dXGX z_>$jr0fsxb2uK=b7si=K?W2I2PIKX+V3K} zj7`ahjX6(Y!rwb}4~9&I4Hjz2l^-`d``g8 zF6C3~4q96B%u}cB__0ZWG3~s-6TEdoU4sE}-q2sI`rYT1i!TRrahnz(2;#z{4VXa? zB>9P4*tU?D<-)5iG0zLIpiKb?+MSy|<>Bz_GMj&KcaPx^86xxPo!}B3dK%AbKu?r`kv8Sg_X#qIx zJitq*S^@P042YNaX(}6&Gre-@viPQcfgS=2a<%ql&z?)X-71TKYRR)PosbUD80CNKCr(eaBp#cZN+Xb-?l%$ zKkFAf+-ta?Fr4J~ldRp83-7T4Kq|0~n30n_KXcBV<*CUTJE^_V6Z@BhL;zCH>VEgh zl^-`poNOW(JsJqx9(gku}d{(?={^vHxSvBzZ!)1%`y zuClMy-v*a8CN64;os5;=Fj1CU_`hk_@ z*YXc;?F1;ih^05zkT_ZHH2}hI?U_{s8ibJiCxg8Og0tZ|_`g1y{SP}pu#QD)8TbGI N002ovPDHLkV1nB#WOV=l literal 0 HcmV?d00001 diff --git a/plugin/mode_indicator/images/other.png b/plugin/mode_indicator/images/other.png new file mode 100644 index 0000000000000000000000000000000000000000..18e95d3f7f328055240fea67ad9e303b37d873b8 GIT binary patch literal 2293 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGqB>(^xB>_oN zB=7(L2zp6GK~!i%)tU=alQ|TIQ(8a@2&m}Hij2bgm-Lr=+p!?XE;}QuvJ4k{WAmK1 zuW7x^xb0VzGsaxLd}+>;bCP@swWm*?UZyF?<>h6BUayxvefpFxE-upf`FX^Y{pwPC z^5n@>zBTxQ5ByPEFSTCLWVff-irM*V-MDch-MqP+*4Nk5%F4~uXf)y(AQ8vYkShV> z5l8ViZ}!vS;bFF#v%#}|4w1?+*5kCTWQKyYurQzQ-MgDMHy`A5GtJI6qTCi&wOkpP z*RNY?clS-qFTLJnRz^SD?~}GG0fYJ_%`;riW%YU^J$P_GZEZbD^Yil=&}`JHTBZsH zg^r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BKbM%1&=j#fB95*Q%KQao2-DeLQZ0?OLjTI^rgyG&v&$kZBEPQ zF&7C2KQHSM2t-iiPD=BfB^U_IDFE?)v7sbC>FV=6xiT;Wgq4J4S&%NmntYn?)dn#bzK;1y#wz$w z6%73)1Ok+63&vtN!~oDCP literal 0 HcmV?d00001 diff --git a/plugin/mode_indicator/images/sleep.png b/plugin/mode_indicator/images/sleep.png new file mode 100644 index 0000000000000000000000000000000000000000..77e72ddd826c3d4abfa6cf84d8df5d403abd3633 GIT binary patch literal 1835 zcmV+`2h{k9P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGqB>(^xB>_oN zB=7(L2Czv)K~!i%)tcK+7CRKhi`?WQh+Mq@F`Dp(F$5AJ@Xmh>fp?Ioi6QW&FNj7G zl%Sx1!133dMb_z=&m*1rgH zjL6|0M9aj)M3|YG2|YbMm6B4)T`-!+fDEF-BSQ}Sj?forZf?G)r`I6{vR}M-5!a~C zpFhX>n5znuCImyax3^=OC^8^Jks&ADVbxP19Vpc&B}VOl=v!M`3!9spVSj(WGEzzr zf&n)ix3E4a_uUD43(s904L>?YjB_^#iOSM93c{geQTJuOh>Z z0@5)WT@D~lhPS(DjE@D>5kYkXn@AgdW68y(2?3g1I&kBVv`s)48R(uiPEtCqh!oek zPQ*e6WiGM^0ZgoD0d72y1CF#01kmOrINVt;i+~-hXWI30kwplT%UCDncfnYV_xk`{ zQ~PBBA(yqsksTpC-Cv=WQ6kXAw{EpLRQCnE2)QIWvIt>fJ_uu=jBtm9w9OrpXxru* zy7yJP>MCpL+O5hElN}*^9ruYbUXY=PoRaS1IZvs+x}M&{@9nzkd~4Mror~-U;iw>8 z2(_5Gp)MeG+C}XiHR)JEZ9uv{KtoC{E=>poAe@_sjMQiuE}d(x%VA21*S)WFuTx4? z2YgN>l_4b;SrI~HaEQdYiAa&rIHbA^Ryw#85ux;#oAd;k9Z7_mgiA74}fMsO}NK0Y1|fD{>s(e6}A7G+8f?JCp0MZz_N zd-wJA#Rx&#+S-2kM*CmL9;vk9(1;T?>L7iBa!T#)v`8sxmtG{?OTs@5Mn^}Z4MYew z$(9_HB7`SF-pO~G0iTZe7*CB&-17XKw%f*&5=>kfPR+NyplarJ2cu_A!GF(Iy zk-#;VTKy330~td@L-Ab*LWmBn9c7{el%w+}Fo3*ef#s}~Lug2$9p^AUeah~d*aDiU<}^ zNVs?JUL*xFsy^(l{O=Hu!ddIbk00ZoWjI9A5obzB5k!iUgR^X{+D%9oeoOtY{|+JG zIAPDnUZRDM(HtUiM8KJeoTS7N)q(4PqfR1#i0JL@jbtFSU5h`=2sj2Yd}f3gQiqSy zTU%R^AnJUR)p`Ml7#w7$z*(Hu>$r5iiE1~g6=h{m7eWA}I59*A22ucH`5+oq{I!=VB4^Hwfqey`m#8abQL str: + if current_mode == "sleep": + return setting_color_sleep.get() + elif current_mode == "dictation": + return setting_color_dictation.get() + elif current_mode == "mixed": + return setting_color_mixed.get() + elif current_mode == "command": + return setting_color_command.get() + else: + return setting_color_other.get() + + +def get_alpha_color() -> str: + return f"{int(setting_color_alpha.get() * 255):02x}" + + +def get_gradient_color(color: str) -> str: + factor = setting_color_gradient.get() + # hex -> rgb + (r, g, b) = tuple(int(color[i : i + 2], 16) for i in (0, 2, 4)) + # Darken rgb + r, g, b = int(r * factor), int(g * factor), int(b * factor) + # rgb -> hex + return f"{r:02x}{g:02x}{b:02x}" + + +def get_colors(): + color_mode = get_mode_color() + color_gradient = get_gradient_color(color_mode) + color_alpha = get_alpha_color() + return f"{color_mode}{color_alpha}", f"{color_gradient}" + + +def on_draw(c: SkiaCanvas): + color_mode, color_gradient = get_colors() + x, y = c.rect.center.x, c.rect.center.y + radius = c.rect.height / 2 - 2 + + c.paint.shader = skia.Shader.radial_gradient( + (x, y), radius, [color_mode, color_gradient] + ) + + c.paint.imagefilter = ImageFilter.drop_shadow(1, 1, 1, 1, color_gradient) + + c.paint.style = c.paint.Style.FILL + c.paint.color = color_mode + c.draw_circle(x, y, radius) + + +def move_indicator(): + screen: Screen = ui.main_screen() + rect = screen.rect + scale = screen.scale if app.platform != "mac" else 1 + radius = setting_size.get() * scale / 2 + + x = rect.left + min( + max(setting_x.get() * rect.width - radius, 0), + rect.width - 2 * radius, + ) + + y = rect.top + min( + max(setting_y.get() * rect.height - radius, 0), + rect.height - 2 * radius, + ) + + side = 2 * radius + canvas.resize(side, side) + canvas.move(x, y) + + +def show_indicator(): + global canvas + canvas = Canvas.from_rect(Rect(0, 0, 0, 0)) + canvas.register("draw", on_draw) + + +def hide_indicator(): + global canvas + canvas.unregister("draw", on_draw) + canvas.close() + canvas = None + + +def update_indicator(): + if setting_show.get(): + if not canvas: + show_indicator() + move_indicator() + canvas.freeze() + elif canvas: + hide_indicator() + + +def on_update_contexts(): + global current_mode + modes = scope.get("mode") + if "sleep" in modes: + mode = "sleep" + elif "dictation" in modes: + if "command" in modes: + mode = "mixed" + else: + mode = "dictation" + elif "command" in modes: + mode = "command" + else: + mode = "other" + + if current_mode != mode: + current_mode = mode + update_indicator() + + +def on_update_settings(updated_settings: set[str]): + if setting_paths & updated_settings: + update_indicator() + + +def on_ready(): + registry.register("update_contexts", on_update_contexts) + registry.register("update_settings", on_update_settings) + ui.register("screen_change", lambda _: update_indicator) + + +app.register("ready", on_ready) diff --git a/plugin/mode_indicator/mode_indicator.talon b/plugin/mode_indicator/mode_indicator.talon new file mode 100644 index 0000000000..6b54783dd4 --- /dev/null +++ b/plugin/mode_indicator/mode_indicator.talon @@ -0,0 +1,23 @@ +settings(): + # Don't show mode indicator by default + user.mode_indicator_show = 0 + # 30pixels diameter + user.mode_indicator_size = 30 + # Center horizontally + user.mode_indicator_x = 0.5 + # Align top + user.mode_indicator_y = 0 + # Slightly transparent + user.mode_indicator_color_alpha = 0.75 + # Grey gradient + user.mode_indicator_color_gradient = 0.5 + # Grey color for sleep mode + user.mode_indicator_color_sleep = "808080" + # Gold color for dictation mode + user.mode_indicator_color_dictation = "ffd700" + # MediumSeaGreen color for mixed mode + user.mode_indicator_color_mixed = "3cb371" + # CornflowerBlue color for command mode + user.mode_indicator_color_command = "6495ed" + # GhostWhite color for other modes + user.mode_indicator_color_other = "f8f8ff" From fc5aa3df38239db8c5ef8b0a64bd22b172fb834c Mon Sep 17 00:00:00 2001 From: Antonio Santos Date: Sun, 2 Jul 2023 04:12:26 +0200 Subject: [PATCH 06/12] Add support for the Orion browser (#1217) [Orion](https://browser.kagi.com) is a relatively recent browser for MacOS that uses the WebKit engine, but supports extensions developed for Firefox and Chrome. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- apps/orion/orion.py | 45 ++++++++++++++++++++++++++++++++++++++++++ apps/orion/orion.talon | 6 ++++++ 2 files changed, 51 insertions(+) create mode 100644 apps/orion/orion.py create mode 100644 apps/orion/orion.talon diff --git a/apps/orion/orion.py b/apps/orion/orion.py new file mode 100644 index 0000000000..c7db542721 --- /dev/null +++ b/apps/orion/orion.py @@ -0,0 +1,45 @@ +from talon import Context, Module, actions, ui +from talon.mac import applescript + +ctx = Context() +mod = Module() +apps = mod.apps +mod.apps.orion = """ +os: mac +app.bundle: com.kagi.kagimacOS +""" + +ctx.matches = r""" +app: orion +""" + + +@ctx.action_class("user") +class UserActions: + def browser_open_address_in_new_tab(): + actions.key("cmd-enter") + + +@ctx.action_class("browser") +class BrowserActions: + def bookmark_tabs(): + raise NotImplementedError("Orion doesn't have a default shortcut for this") + + def show_clear_cache(): + actions.key("cmd-alt-e") + + def reload_hard(): + actions.key("cmd-alt-r") + + def show_downloads(): + actions.key("cmd-alt-l") + + def show_extensions(): + actions.key("cmd-shift-x") + + +@mod.action_class +class Actions: + def overview_tabs(): + "Toggle tab overview in Orion" + actions.key("cmd-shift-\\") diff --git a/apps/orion/orion.talon b/apps/orion/orion.talon new file mode 100644 index 0000000000..e845d3e2fe --- /dev/null +++ b/apps/orion/orion.talon @@ -0,0 +1,6 @@ +app: orion +- +tag(): browser +tag(): user.tabs + +tab overview [open | close]: user.overview_tabs() From 38cb583db62593165c9938dd481b5f2b159e4d53 Mon Sep 17 00:00:00 2001 From: Jacob Egner Date: Sun, 2 Jul 2023 07:59:07 +0530 Subject: [PATCH 07/12] add `control off` command for mouse (#1206) --- plugin/mouse/mouse.talon | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/mouse/mouse.talon b/plugin/mouse/mouse.talon index c470dc137b..638b528f80 100644 --- a/plugin/mouse/mouse.talon +++ b/plugin/mouse/mouse.talon @@ -1,4 +1,5 @@ control mouse: tracking.control_toggle() +control off: user.mouse_sleep() zoom mouse: tracking.control_zoom_toggle() camera overlay: tracking.control_debug_toggle() run calibration: tracking.calibrate() From 14de62648ce0a06a783aa3740ee2f2c8d810e794 Mon Sep 17 00:00:00 2001 From: David Vo Date: Mon, 10 Jul 2023 01:08:12 +1000 Subject: [PATCH 08/12] java: Remove shadowed function action impls (#1227) These are really implemented below: https://github.com/knausj85/knausj_talon/blob/38cb583db62593165c9938dd481b5f2b159e4d53/lang/java/java.py#L262-L264 https://github.com/knausj85/knausj_talon/blob/38cb583db62593165c9938dd481b5f2b159e4d53/lang/java/java.py#L282-L283 https://github.com/knausj85/knausj_talon/blob/38cb583db62593165c9938dd481b5f2b159e4d53/lang/java/java.py#L300-L301 --- lang/java/java.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lang/java/java.py b/lang/java/java.py index 17b375c92c..6c9938fb74 100644 --- a/lang/java/java.py +++ b/lang/java/java.py @@ -239,15 +239,6 @@ def code_define_class(): def code_import(): actions.insert("import ") - def code_private_function(text: str): - actions.insert("private") - - def code_protected_function(text: str): - actions.user.code_private_function() - - def code_public_function(text: str): - actions.insert("public ") - def code_state_return(): actions.insert("return ") From 9acb6c9659bb0c9b794a7b7126d025603b4ed726 Mon Sep 17 00:00:00 2001 From: David Vo Date: Mon, 10 Jul 2023 08:47:10 +1000 Subject: [PATCH 09/12] edit_mac: Set the find pasteboard (#1226) --- core/edit/edit_mac.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/edit/edit_mac.py b/core/edit/edit_mac.py index b4be730d13..131038eb00 100644 --- a/core/edit/edit_mac.py +++ b/core/edit/edit_mac.py @@ -1,4 +1,4 @@ -from talon import Context, actions +from talon import Context, actions, clip ctx = Context() ctx.matches = r""" @@ -90,8 +90,9 @@ def file_start(): actions.key("cmd-up") def find(text: str = None): + if text is not None: + clip.set_text(text, mode="find") actions.key("cmd-f") - # actions.insert(text) def find_next(): actions.key("cmd-g") From 6f2d2858cc20b8b6ce313e6800db7819dcef870c Mon Sep 17 00:00:00 2001 From: timo Date: Sat, 15 Jul 2023 15:59:45 +0200 Subject: [PATCH 10/12] don't bail out of get_linux_apps if one desktop file fails (#1229) I have experienced this with a desktop file that contains `Terminal=false` twice for some reason --------- Co-authored-by: Jeff Knaus Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- core/app_switcher/app_switcher.py | 38 ++++++++++++++++++------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/core/app_switcher/app_switcher.py b/core/app_switcher/app_switcher.py index ab85e9ebc0..4866d61072 100644 --- a/core/app_switcher/app_switcher.py +++ b/core/app_switcher/app_switcher.py @@ -185,22 +185,28 @@ def get_linux_apps(): if os.path.isdir(base): for entry in os.scandir(base): if entry.name.endswith(".desktop"): - config = configparser.ConfigParser(interpolation=None) - config.read(entry.path) - # only parse shortcuts that are not hidden - if config.has_option("Desktop Entry", "NoDisplay") == False: - name_key = config["Desktop Entry"]["Name"] - exec_key = config["Desktop Entry"]["Exec"] - # remove extra quotes from exec - if exec_key[0] == '"' and exec_key[-1] == '"': - exec_key = re.sub('"', "", exec_key) - # remove field codes and add full path if necessary - if exec_key[0] == "/": - items[name_key] = re.sub(args_pattern, "", exec_key) - else: - items[name_key] = "/usr/bin/" + re.sub( - args_pattern, "", exec_key - ) + try: + config = configparser.ConfigParser(interpolation=None) + config.read(entry.path) + # only parse shortcuts that are not hidden + if config.has_option("Desktop Entry", "NoDisplay") == False: + name_key = config["Desktop Entry"]["Name"] + exec_key = config["Desktop Entry"]["Exec"] + # remove extra quotes from exec + if exec_key[0] == '"' and exec_key[-1] == '"': + exec_key = re.sub('"', "", exec_key) + # remove field codes and add full path if necessary + if exec_key[0] == "/": + items[name_key] = re.sub(args_pattern, "", exec_key) + else: + items[name_key] = "/usr/bin/" + re.sub( + args_pattern, "", exec_key + ) + except: + print( + "get_linux_apps: skipped parsing application file ", + entry.name, + ) return items From ed4cb1353906c8f79ace3d48150de2bb88fe65cf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 15 Jul 2023 08:01:31 -0600 Subject: [PATCH 11/12] [pre-commit.ci] pre-commit autoupdate (#1196) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.9-for-vscode β†’ v3.0.0](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.9-for-vscode...v3.0.0) - https://github.com/ikamensh/flynt/: 0.78 β†’ 1.0.0 - [github.com/wenkokke/talonfmt: 1.9.5 β†’ 1.10.1](https://github.com/wenkokke/talonfmt/compare/1.9.5...1.10.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40be533079..2ef285bea4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,11 +23,11 @@ repos: - id: end-of-file-fixer - id: mixed-line-ending - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.0-alpha.9-for-vscode" + rev: "v3.0.0" hooks: - id: prettier - repo: https://github.com/ikamensh/flynt/ - rev: "0.78" + rev: "1.0.0" hooks: - id: flynt - repo: https://github.com/pycqa/isort @@ -46,7 +46,7 @@ repos: files: \.talon$ args: ["--whitespaces-count=4"] - repo: https://github.com/wenkokke/talonfmt - rev: 1.9.5 + rev: 1.10.1 hooks: - id: talonfmt args: ["--in-place"] From 7525147851e159ddb6b3d40da7f8ffce5a6e6deb Mon Sep 17 00:00:00 2001 From: Phil Cohen Date: Sat, 15 Jul 2023 11:23:01 -0700 Subject: [PATCH 12/12] `knausj`: rebrand, honor original creator (#1231) https://github.com/talonhub/community/issues/935. We're not in ~Kansas~ knausj anymore... This updates: - The main title of the README (as well as most references therein) and adds a note about our origins. [View here]( https://github.com/talonhub/community/tree/rebrand) - The cloning instructions in the README. - (This might be up for debate; do we want people to `git clone https://github.com/talonhub/community community`? Some users might end up with two copies. I think @lunixbochs had a plan to check for if people have both knausj and community cloned duplicative side by side by mistake.) - GitHub's web UI recommends `https://github.com/talonhub/community.git` as the HTTPS URL, but our old instructions did not include the `.git` suffix. What do we want to do? - All GitHub links in the form of `https://github.com/knausj85/knausj_talon/`, such as to issues. - A few manual references in text files, such as in the deprecation process. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jeff Knaus --- BREAKING_CHANGES.txt | 2 +- CONTRIBUTING.md | 4 +- README.md | 72 ++++++++++--------- apps/README.md | 4 +- apps/talon_repl/talon_repl.talon | 2 +- apps/vscode/command_client/README.md | 6 +- core/app_switcher/app_switcher.py | 2 +- core/deprecations.py | 4 +- core/edit/edit.py | 2 +- core/edit_text_file.py | 2 +- core/user_settings.py | 2 +- lang/talon/talon.py | 2 +- lang/talon/talon.talon | 2 +- plugin/talon_draft_window/README.md | 4 +- .../talon_draft_window/draft_talon_helpers.py | 2 +- plugin/talon_draft_window/draft_window.talon | 2 +- plugin/talon_helpers/talon_helpers.talon | 2 +- test/stubs/talon/grammar.py | 2 +- 18 files changed, 62 insertions(+), 56 deletions(-) diff --git a/BREAKING_CHANGES.txt b/BREAKING_CHANGES.txt index 32ea7700b1..6c9d44c4b9 100644 --- a/BREAKING_CHANGES.txt +++ b/BREAKING_CHANGES.txt @@ -1,4 +1,4 @@ -This file lists known changes to knausj_talon that are likely to have broken existing +This file lists known changes to `community` that are likely to have broken existing functionality. The file is sorted by date with the newest entries up the top. Be aware there may be some difference between the date in this file and when the change was diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d76abee864..c5ddf51543 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,11 +1,11 @@ -This document attempts to list a set of principles for contributors to the knausj_talon repository to consider. The idea is to document some agreed upon approaches toward reviewing and including code so we can all more easily make consistent decisions. +This document attempts to list a set of principles for contributors to the `community` repository to consider. The idea is to document some agreed upon approaches toward reviewing and including code so we can all more easily make consistent decisions. Each of the principles is numbered for easy referencing. The body is formatted as a short single-line summary of the principle followed by elaboration and discussion links. # Voice command principles - P01 - Prefer [object][verb] rather than [verb][object] for new commands. For example 'file save' is better than 'save file'. It may not sound as natural, but it helps for grouping related commands in lists and avoiding conflicting names. -- P02 - Use `browser.host` matcher for web apps. Though this matcher requires a [browser extension](https://github.com/knausj85/knausj_talon/blob/main/apps/README.md) on some operating systems it is the only unambiguous way of referring to a web app. +- P02 - Use `browser.host` matcher for web apps. Though this matcher requires a [browser extension](https://github.com/talonhub/community/blob/main/apps/README.md) on some operating systems it is the only unambiguous way of referring to a web app. # Coding principles diff --git a/README.md b/README.md index 6a9f6f39f2..21cff78dfe 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# knausj_talon +# community -Community-maintained [Talon](https://talonvoice.com/) command grammar. +Voice command set for [Talon](https://talonvoice.com/), community-supported. + +_(Originally called `knausj_talon`, after [its original creator :superhero:](https://github.com/knausj85))_ Can be used on its own, but shines when combined with: @@ -21,7 +23,7 @@ Can be used on its own, but shines when combined with: ### Linux & Mac -It is recommended to install `knausj_talon` using [`git`](https://git-scm.com/). +It is recommended to install `community` using [`git`](https://git-scm.com/). 1. Install [`git`](https://git-scm.com/) 2. Open a terminal ([Mac](https://support.apple.com/en-gb/guide/terminal/apd5265185d-f365-44cb-8b09-71a064a42125/mac) / [Ubuntu](https://ubuntu.com/tutorials/command-line-for-beginners#3-opening-a-terminal)) @@ -29,14 +31,14 @@ It is recommended to install `knausj_talon` using [`git`](https://git-scm.com/). ```bash cd ~/.talon/user - git clone https://github.com/knausj85/knausj_talon knausj_talon + git clone https://github.com/talonhub/community community ``` -Note that it is also possible to install knausj by [downloading and extracting a zip file](#alternate-installation-method-zip-file), but this approach is discouraged because it makes it more difficult to keep track of any changes you may make to your copy of the files. +Note that it is also possible to install `community` by [downloading and extracting a zip file](#alternate-installation-method-zip-file), but this approach is discouraged because it makes it more difficult to keep track of any changes you may make to your copy of the files. ### Windows -It is recommended to install `knausj_talon` using [`git`](https://git-scm.com/). +It is recommended to install `community` using [`git`](https://git-scm.com/). 1. Install [`git`](https://git-scm.com/) 2. Open a [terminal](https://www.wikihow.com/Open-the-Command-Prompt-in-Windows) @@ -44,23 +46,23 @@ It is recommended to install `knausj_talon` using [`git`](https://git-scm.com/). ``` cd %AppData%\Talon\user - git clone https://github.com/knausj85/knausj_talon knausj_talon + git clone https://github.com/talonhub/community community ``` -Note that it is also possible to install knausj by [downloading and extracting a zip file](#alternate-installation-method-zip-file), but this approach is discouraged because it makes it more difficult to keep track of any changes you may make to your copy of the files. +Note that it is also possible to install `community` by [downloading and extracting a zip file](#alternate-installation-method-zip-file), but this approach is discouraged because it makes it more difficult to keep track of any changes you may make to your copy of the files. ## Getting started with Talon 1. `help active` will display the available commands for the active application. - Available commands can change with the application, or even window title that has focus. - You may navigate help using the displayed numbers. e.g., `help one one` or `help eleven` to open the 11th item in the help list. - - Note that all help-related commands are defined in [`core/help/help.talon`](https://github.com/knausj85/knausj_talon/blob/main/core/help/help.talon) and [`core/help/help_open.talon`](https://github.com/knausj85/knausj_talon/blob/main/core/help/help_open.talon) + - Note that all help-related commands are defined in [`core/help/help.talon`](https://github.com/talonhub/community/blob/main/core/help/help.talon) and [`core/help/help_open.talon`](https://github.com/talonhub/community/blob/main/core/help/help_open.talon) 2. You can also search for commands by saying `help search `. For example, `help search tab` displays all tab-related commands, and `help search help` displays all help-related commands. 3. You can also jump immediately into a particular help context display by recalling the name displayed in help window (based on the name of the .talon file) e.g. `help symbols` or `help visual studio` 4. `help alphabet` will display the alphabet 5. `command history` will toggle a display of the recent commands 6. `help format` will display the available formatters with examples. -7. Many useful, basic commands are defined in https://github.com/knausj85/knausj_talon/blob/main/core/edit/standard.talon +7. Many useful, basic commands are defined in https://github.com/talonhub/community/blob/main/core/edit/standard.talon - `undo that` and `redo that` are the default undo/redo commands. - `paste that`, `copy that`, and `cut that` for pasting/copy/cutting, respectively. 8. For community-generated documentation on Talon itself, please visit https://talon.wiki/ @@ -76,7 +78,7 @@ If you use vim, just start with the numbers and alphabet, otherwise look at gene ### Alphabet The alphabet is defined here -https://github.com/knausj85/knausj_talon/blob/main/core/keys/keys.py#L3 +https://github.com/talonhub/community/blob/main/core/keys/keys.py#L3 `help alphabet` will open a window that displays the alphabet. `help close` to hide the window. @@ -84,9 +86,9 @@ Try saying e.g. `air bat cap` to insert abc. ### Keys -Keys are defined in keys.py. The alphabet is used for A-Z. For the rest, search for `modifier_keys` and then keep scrolling through the file, eg. roughly https://github.com/knausj85/knausj_talon/blob/main/core/keys/keys.py#L111 +Keys are defined in keys.py. The alphabet is used for A-Z. For the rest, search for `modifier_keys` and then keep scrolling through the file, eg. roughly https://github.com/talonhub/community/blob/main/core/keys/keys.py#L111 -All key commands are defined in [keys.talon](https://github.com/knausj85/knausj_talon/blob/main/core/keys/keys.talon). For example, say `shift air` to press `shift-a`, which types a capital `A`. +All key commands are defined in [keys.talon](https://github.com/talonhub/community/blob/main/core/keys/keys.talon). For example, say `shift air` to press `shift-a`, which types a capital `A`. On Windows, try commands such as @@ -105,9 +107,9 @@ Any combination of the modifiers, symbols, alphabet, numbers and function keys c ### Symbols Some symbols are defined in keys.py, so you can say e.g. `control colon` to press those keys. -https://github.com/knausj85/knausj_talon/blob/main/core/keys/keys.py#L140 +https://github.com/talonhub/community/blob/main/core/keys/keys.py#L140 -Some other symbols are defined here: https://github.com/knausj85/knausj_talon/blob/main/plugin/symbols/symbols.talon +Some other symbols are defined here: https://github.com/talonhub/community/blob/main/plugin/symbols/symbols.talon ### Formatters @@ -118,24 +120,24 @@ Try using formatters by saying e.g. `snake hello world`, which will insert hello Multiple formatters can be used together, e.g. `dubstring snake hello world`. This will insert "hello_world" Formatters (snake, dubstring) are defined here -https://github.com/knausj85/knausj_talon/blob/main/core/text/formatters.py#L137 +https://github.com/talonhub/community/blob/main/core/text/formatters.py#L137 All formatter-related commands are defined here -https://github.com/knausj85/knausj_talon/blob/main/core/text/text.talon#L8 +https://github.com/talonhub/community/blob/main/core/text/text.talon#L8 ### Mouse commands -See https://github.com/knausj85/knausj_talon/blob/main/plugin/mouse/mouse.talon +See https://github.com/talonhub/community/blob/main/plugin/mouse/mouse.talon ### Generic editing commands -https://github.com/knausj85/knausj_talon/blob/main/core/edit/edit.talon +https://github.com/talonhub/community/blob/main/core/edit/edit.talon These generic commands are global. Commands such as `go word left` will work in any text box. ### Repeating commands -For repeating commands, useful voice commands are defined here: https://github.com/knausj85/knausj_talon/blob/main/plugin/repeater/repeater.talon +For repeating commands, useful voice commands are defined here: https://github.com/talonhub/community/blob/main/plugin/repeater/repeater.talon Try saying e.g. `go up fifth` will go up five lines. Try saying e.g. `select up third` to hit `shift-up` three times to select some lines in a text field. @@ -143,7 +145,7 @@ Try saying e.g. `select up third` to hit `shift-up` three times to select some l ### Window management Global window managment commands are defined here: -https://github.com/knausj85/knausj_talon/blob/main/core/windows_and_tabs/window_management.talon +https://github.com/talonhub/community/blob/main/core/windows_and_tabs/window_management.talon - `running list` will toggle a GUI list of words you can say to switch to running applications. - `focus chrome` will focus the chrome application. @@ -151,7 +153,7 @@ https://github.com/knausj85/knausj_talon/blob/main/core/windows_and_tabs/window_ ### Screenshot commands -https://github.com/knausj85/knausj_talon/blob/main/plugin/screenshot/screenshot.talon +https://github.com/talonhub/community/blob/main/plugin/screenshot/screenshot.talon ### Programming Languages @@ -159,14 +161,14 @@ Specific programming languages may be activated by voice commands, or via title Activating languages via commands will enable the commands globally, e.g. they'll work in any application. This will also disable the title tracking method (code.language in .talon files) until the "clear language modes" voice command is used. -The commands for enabling languages are defined here: https://github.com/knausj85/knausj_talon/blob/main/core/modes/language_modes.talon +The commands for enabling languages are defined here: https://github.com/talonhub/community/blob/main/core/modes/language_modes.talon By default, title tracking activates coding languages in supported applications such as VSCode, Visual Studio (requires plugin), and Notepad++. To enable title tracking for your application: 1. The active filename (including extension) must be included in the editor's title -2. Implement the required Talon-defined `filename` action to correctly extract the filename from the programs's title. See https://github.com/knausj85/knausj_talon/blob/main/apps/vscode/vscode.py#L122-L138 for an example. +2. Implement the required Talon-defined `filename` action to correctly extract the filename from the programs's title. See https://github.com/talonhub/community/blob/main/apps/vscode/vscode.py#L122-L138 for an example. Python, C#, Talon and javascript language support is currently broken up into several tags in an attempt to define a common grammar where possible between languages. Each tag is defined by a .talon file, which defines the voice commands, and a Python file which declares the actions that should be implemented by each concrete language implementation to support those voice commands. Currently, the tags which are available are: @@ -192,7 +194,7 @@ The support for the language-specific implementations of actions are then locate - `lang/{your-language}/{your-language}.py` -To start support for a new language, ensure the appropriate extension is added to the [`language_extensions` in language_modes.py](https://github.com/knausj85/knausj_talon/blob/main/core/modes/language_modes.py#L9). +To start support for a new language, ensure the appropriate extension is added to the [`language_extensions` in language_modes.py](https://github.com/talonhub/community/blob/main/core/modes/language_modes.py#L9). Then create the following files: - `lang/{your-language}/{your-language}.py` @@ -204,7 +206,7 @@ You may also want to add a force command to `language_modes.talon`. ## File Manager commands -For the following file manager commands to work, your file manager must display the full folder path in the title bar. https://github.com/knausj85/knausj_talon/blob/main/tags/file_manager/file_manager.talon +For the following file manager commands to work, your file manager must display the full folder path in the title bar. https://github.com/talonhub/community/blob/main/tags/file_manager/file_manager.talon For Mac OS X's Finder, run this command in terminal to display the full path in the title. @@ -226,7 +228,7 @@ Notes: To implement support for a new program, you need to implement the relevant file manager actions for your application and assert the user.file_manager tag. - There are a number of example implementations in the repository. Finder is a good example to copy and customize to your application as needed. - https://github.com/knausj85/knausj_talon/blob/main/apps/finder/finder.py + https://github.com/talonhub/community/blob/main/apps/finder/finder.py ## Terminal commands @@ -255,7 +257,7 @@ line in [unix_shell.py](tags/terminal/unix_shell.py): Once you have uncommented the line, you can customize your utility commands by editing `settings/unix_utilities.csv`. Note: this directory is created when first running Talon -with knausj_talon enabled. +with community enabled. ## Jetbrains commands @@ -266,7 +268,7 @@ into each editor. Several options are configurable via a single settings file out of the box. Any setting can be made context specific as needed (e.g., per-OS, per-app, etc). -https://github.com/knausj85/knausj_talon/blob/main/settings.talon +https://github.com/talonhub/community/blob/main/settings.talon ``` #adjust the scale of the imgui to my liking @@ -299,11 +301,11 @@ The most commonly adjusted settings are probably β€’ `user.mouse_wheel_down_amount` and `user.mouse_continuous_scroll_amount` for adjusting the scroll amounts for the various scroll commands. -Also, you can add additional vocabulary words, words to replace, search engines and more. Complete the knausj_talon setup instructions above, then open the `settings` folder to see the provided CSV files and customize them as needed. +Also, you can add additional vocabulary words, words to replace, search engines and more. Complete the community setup instructions above, then open the `settings` folder to see the provided CSV files and customize them as needed. ## Other talon user file sets -In addition to this repo, there are [other Talon user file sets](https://talon.wiki/talon_user_file_sets/) containing additional commands that you may want to experiment with if you're feeling adventurous 😊. Many of them are meant to be used alongside knausj, but a few of them are designed as replacements. If it's not clear which, please file an issue against the given GitHub repository for that user file set! +In addition to this repo, there are [other Talon user file sets](https://talon.wiki/talon_user_file_sets/) containing additional commands that you may want to experiment with if you're feeling adventurous 😊. Many of them are meant to be used alongside `community`, but a few of them are designed as replacements. If it's not clear which, please file an issue against the given GitHub repository for that user file set! # Collaborators @@ -341,7 +343,7 @@ You then have a few options as to when to run it: - Run yourself at any time on your locally changed files: `pre-commit run` - Run yourself on all files in the repository: `pre-commit run --all-files` - Run automatically on your PRs (fixes will be pushed automatically to your branch): - - Visit https://pre-commit.ci/ and authorize the app to connect to your knausj fork. + - Visit https://pre-commit.ci/ and authorize the app to connect to your `community` fork. - Set up an editor hook to run on save: - You could follow the instructions for [Black](https://black.readthedocs.io/en/stable/integrations/editors.html), which are well written; simply replace `black ` with `pre-commit run --files `. - It's more performant to only reformat the specific file you're editing, rather than all changed files. @@ -366,10 +368,10 @@ For community-generated documentation on Talon, please visit https://talon.wiki/ ## Alternate installation method: Zip file -It is possible to install knausj by downloading and extracting a zip file instead of using `git`. Note that this approach is discouraged, because it makes it more difficult to keep track of any changes you may make to your copy of the files. +It is possible to install `community` by downloading and extracting a zip file instead of using `git`. Note that this approach is discouraged, because it makes it more difficult to keep track of any changes you may make to your copy of the files. -If you wish to install `knausj_talon` by downloading and extracting a zip file, proceed as follows: +If you wish to install `community` by downloading and extracting a zip file, proceed as follows: -1. Download the [zip archive of knausj_talon](https://github.com/knausj85/knausj_talon/archive/refs/heads/main.zip) +1. Download the [zip archive of community](https://github.com/talonhub/community/archive/refs/heads/main.zip) 1. Extract the files. If you don’t know how to extract zip files, a quick google search for "extract zip files" may be helpful. 1. Place these extracted files inside the `user` folder of the Talon Home directory. You can find this folder by right clicking the Talon icon in taskbar, clicking Scripting > Open ~/talon, and navigating to `user`. diff --git a/apps/README.md b/apps/README.md index 12d1cbb604..b0bf4e753c 100644 --- a/apps/README.md +++ b/apps/README.md @@ -1,6 +1,8 @@ # Web apps and browser extensions -Some of the Talon files for web apps (e.g. `apps/github/github_web.talon`) use a `browser.host` matcher. These talon files should work out of the box for Safari, Chrome, Brave, on Mac, but require additional configuration on other browsers/operating systems. `knausj_talon` is set up so that if a URL is found in the titlebar of an application matching the 'browser' tag it will be used to populate the browser.host matcher (see `code/browser.py`). This probably means that you will need an extension to make the browser.host based scripts work. +Some of the Talon files for web apps (e.g. `apps/github/github_web.talon`) use a `browser.host` matcher. These talon files should work out of the box for Safari, Chrome, Brave, on Mac, but require additional configuration on other browsers/operating systems. + +`community` is set up so that if a URL is found in the titlebar of an application matching the 'browser' tag it will be used to populate the browser.host matcher (see `code/browser.py`). This probably means that you will need an extension to make the browser.host based scripts work. Browser extensions that can add the protocol and hostname or even the entire URL to the window title: diff --git a/apps/talon_repl/talon_repl.talon b/apps/talon_repl/talon_repl.talon index b60a2644ba..7081206fca 100644 --- a/apps/talon_repl/talon_repl.talon +++ b/apps/talon_repl/talon_repl.talon @@ -6,7 +6,7 @@ tag(): user.talon_python # uncomment user.talon_populate_lists tag to activate talon-specific lists of actions, scopes, modes etcetera. # Do not enable this tag with dragon, as it will be unusable. # with conformer, the latency increase may also be unacceptable depending on your cpu -# see https://github.com/knausj85/knausj_talon/issues/600 +# see https://github.com/talonhub/community/issues/600 # tag(): user.talon_populate_lists ^test last$: diff --git a/apps/vscode/command_client/README.md b/apps/vscode/command_client/README.md index b4c26fd330..844d5849d2 100644 --- a/apps/vscode/command_client/README.md +++ b/apps/vscode/command_client/README.md @@ -4,9 +4,11 @@ This directory contains the client code for communicating with the [VSCode comma ## Contributing -The source of truth is in https://github.com/knausj85/knausj_talon/tree/main/apps/vscode/command_client, but the code is also maintained as a subtree at https://github.com/pokey/talon-vscode-command-client. +The source of truth is in https://github.com/talonhub/community/tree/main/apps/vscode/command_client, but the code is also maintained as a subtree at https://github.com/pokey/talon-vscode-command-client. -To contribute, first open a PR on knausj. Once the PR is merged, you can push the changes to the subtree by running the following commands on an up-to-date knausj main: (need write access) +To contribute, first open a PR on `community`. + +Once the PR is merged, you can push the changes to the subtree by running the following commands on an up-to-date `community` main: (need write access) ```sh git subtree split --prefix=apps/vscode/command_client --annotate="[split] " -b split diff --git a/core/app_switcher/app_switcher.py b/core/app_switcher/app_switcher.py index 4866d61072..c67a19adee 100644 --- a/core/app_switcher/app_switcher.py +++ b/core/app_switcher/app_switcher.py @@ -10,7 +10,7 @@ # Construct at startup a list of overides for application names (similar to how homophone list is managed) # ie for a given talon recognition word set `one note`, recognized this in these switcher functions as `ONENOTE` # the list is a comma seperated `, ` -# TODO: Consider put list csv's (homophones.csv, app_name_overrides.csv) files together in a seperate directory,`knausj_talon/lists` +# TODO: Consider put list csv's (homophones.csv, app_name_overrides.csv) files together in a seperate directory,`community/lists` overrides_directory = os.path.dirname(os.path.realpath(__file__)) override_file_name = f"app_name_overrides.{talon.app.platform}.csv" override_file_path = os.path.join(overrides_directory, override_file_name) diff --git a/core/deprecations.py b/core/deprecations.py index c257d520dc..feee5a5393 100644 --- a/core/deprecations.py +++ b/core/deprecations.py @@ -3,7 +3,7 @@ be an important part of people's workflows providing a warning before removing functionality is encouraged. -The normal deprecation process in knausj_talon is as follows: +The normal deprecation process in `community` is as follows: 1. For 6 months from deprecation a deprecated action or command should continue working. Put an entry in the BREAKING_CHANGES.txt file in the @@ -46,7 +46,7 @@ def legacy_capture(m) -> str: actions.user.deprecate_capture("2023-09-03", "user.legacy_capture") # implement capture -See https://github.com/knausj85/knausj_talon/issues/940 for original discussion +See https://github.com/talonhub/community/issues/940 for original discussion """ import datetime diff --git a/core/edit/edit.py b/core/edit/edit.py index 9c8ecb1b3a..36d593c3ca 100644 --- a/core/edit/edit.py +++ b/core/edit/edit.py @@ -35,7 +35,7 @@ def line_clone(): actions.edit.paste() # # This simpler implementation of select_word mostly works, but in some apps it doesn't. - # # See https://github.com/knausj85/knausj_talon/issues/1084. + # # See https://github.com/talonhub/community/issues/1084. # def select_word(): # actions.edit.right() # actions.edit.word_left() diff --git a/core/edit_text_file.py b/core/edit_text_file.py index 08ce69471d..f246baf763 100644 --- a/core/edit_text_file.py +++ b/core/edit_text_file.py @@ -3,7 +3,7 @@ from talon import Context, Module, app -# path to knausj root directory +# path to community/knausj root directory REPO_DIR = os.path.dirname(os.path.dirname(__file__)) SETTINGS_DIR = os.path.join(REPO_DIR, "settings") diff --git a/core/user_settings.py b/core/user_settings.py index 5fb8abb02f..2630f2c518 100644 --- a/core/user_settings.py +++ b/core/user_settings.py @@ -5,7 +5,7 @@ from talon import resource # NOTE: This method requires this module to be one folder below the top-level -# knausj folder. +# community/knausj folder. SETTINGS_DIR = Path(__file__).parents[1] / "settings" if not SETTINGS_DIR.is_dir(): diff --git a/lang/talon/talon.py b/lang/talon/talon.py index 3eabb6188b..632360084e 100644 --- a/lang/talon/talon.py +++ b/lang/talon/talon.py @@ -10,7 +10,7 @@ # is active to prevent them from being active in contexts where they are not wanted. # Do not enable this tag with dragon, as it will be unusable. # with conformer, the latency increase may also be unacceptable depending on your cpu -# see https://github.com/knausj85/knausj_talon/issues/600 +# see https://github.com/talonhub/community/issues/600 ctx_talon_lists.matches = r""" tag: user.talon_populate_lists """ diff --git a/lang/talon/talon.talon b/lang/talon/talon.talon index 68cc0d0d11..119b1e65bf 100644 --- a/lang/talon/talon.talon +++ b/lang/talon/talon.talon @@ -7,7 +7,7 @@ tag(): user.code_functions_common # uncomment user.talon_populate_lists tag to activate talon-specific lists of actions, scopes, modes etcetera. # Do not enable this tag with dragon, as it will be unusable. # with conformer, the latency increase may also be unacceptable depending on your cpu -# see https://github.com/knausj85/knausj_talon/issues/600 +# see https://github.com/talonhub/community/issues/600 # tag(): user.talon_populate_lists dot talon: insert(".talon") diff --git a/plugin/talon_draft_window/README.md b/plugin/talon_draft_window/README.md index 8f30ce7c39..e50bc6106d 100644 --- a/plugin/talon_draft_window/README.md +++ b/plugin/talon_draft_window/README.md @@ -8,10 +8,10 @@ An session might go like this for example: # Start with the text "this is a sentence with an elephant." in your editor or other textbox draft edit all # Select all the text in your editor and moves it to the draft window - replace gust with error # Replaces the word corresponding with the red anchor 'g' (gust in knausj_talon) with the word 'error' + replace gust with error # Replaces the word corresponding with the red anchor 'g' (gust in community) with the word 'error' period # Add a full stop select each through fine # Select the words starting at the 'e' anchor and ending at 'f' - say without # Insert the word 'without' (knausj_talon) + say without # Insert the word 'without' (community) title word air # Make the word corresponding to the 'a' anchor capitalised draft submit # Type the text in your draft window back into your editor # End with the text "This is a sentence without error." in your editor or other textbox diff --git a/plugin/talon_draft_window/draft_talon_helpers.py b/plugin/talon_draft_window/draft_talon_helpers.py index 304e1088b4..f6441d33e3 100644 --- a/plugin/talon_draft_window/draft_talon_helpers.py +++ b/plugin/talon_draft_window/draft_talon_helpers.py @@ -72,7 +72,7 @@ def _update_draft_style(*args): class ContextSensitiveDictationActions: """ Override these actions to assist 'Smart dictation mode'. - see https://github.com/knausj85/knausj_talon/pull/356 + see https://github.com/talonhub/community/pull/356 """ def dictation_peek(left, right): diff --git a/plugin/talon_draft_window/draft_window.talon b/plugin/talon_draft_window/draft_window.talon index 4c9c7217da..194581c334 100644 --- a/plugin/talon_draft_window/draft_window.talon +++ b/plugin/talon_draft_window/draft_window.talon @@ -2,7 +2,7 @@ title: Talon Draft - settings(): - # Enable 'Smart dictation mode', see https://github.com/knausj85/knausj_talon/pull/356 + # Enable 'Smart dictation mode', see https://github.com/talonhub/community/pull/356 user.context_sensitive_dictation = 1 # Replace a single word with a phrase diff --git a/plugin/talon_helpers/talon_helpers.talon b/plugin/talon_helpers/talon_helpers.talon index 91d8dab3b6..0caeebfe61 100644 --- a/plugin/talon_helpers/talon_helpers.talon +++ b/plugin/talon_helpers/talon_helpers.talon @@ -51,4 +51,4 @@ talon dump context: clip.set_text(result) talon (bug report | report bug): - user.open_url("https://github.com/knausj85/knausj_talon/issues") + user.open_url("https://github.com/talonhub/community/issues") diff --git a/test/stubs/talon/grammar.py b/test/stubs/talon/grammar.py index c3681b4b09..cc1603a94f 100644 --- a/test/stubs/talon/grammar.py +++ b/test/stubs/talon/grammar.py @@ -1,4 +1,4 @@ -# This is a class in the Talon runtime, but is only used as a type in knausj. We +# This is a class in the Talon runtime, but is only used as a type in `community`. We # stub it here as a blank class, since there are (for example) functions which # check isinstance(some_input, Phrase), and for testing we want these tests to # return False.