Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit bcd6a64
Author: Andreas Arvidsson <[email protected]>
Date:   Sun Jul 21 18:26:26 2024 +0200

    Refactor dragon engine (talonhub#1505)

    Fixes talonhub#1503

commit bed708a
Author: Andreas Arvidsson <[email protected]>
Date:   Sun Jul 21 17:41:38 2024 +0200

    Use Talon screen ordering (talonhub#1502)

commit 7f2d601
Author: Andreas Arvidsson <[email protected]>
Date:   Sun Jul 21 17:38:04 2024 +0200

    Made default noise implementations noop (talonhub#1500)

commit 9bf9a02
Author: Andreas Arvidsson <[email protected]>
Date:   Sun Jul 21 17:32:09 2024 +0200

    Don't use mimic when not using dragon (talonhub#1504)

commit 5b43105
Author: Brad Majewski <[email protected]>
Date:   Tue Jul 16 03:12:37 2024 -0400

    Fixing display of scroll mode for wheel gaze (talonhub#1485)

commit 9498ffc
Author: Andreas Arvidsson <[email protected]>
Date:   Tue Jul 9 16:17:50 2024 +0200

    Unify go back and go forward implementations (talonhub#1490)

    This implements standardized go back and go forward voice commands as
    well as matching actions to be used in applications system wide

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit 2c18a5f
Author: Andreas Arvidsson <[email protected]>
Date:   Sun Jul 7 19:10:40 2024 +0200

    Custom subtitles (talonhub#1467)

    Custom subtitles and notifications with settings to tweak color,
    position and timeout.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Nicholas Riley <[email protected]>

commit ab63241
Author: Nicholas Riley <[email protected]>
Date:   Sat Jul 6 14:35:55 2024 -0400

    For help, consider any context with a match beginning with "app" application-specific. (talonhub#1481)

commit 63f33a6
Author: Adam Ambrosius <[email protected]>
Date:   Sat Jul 6 14:09:04 2024 -0400

    Added Warp App (talonhub#1472)

    Adds a basic configuration to be able to use the warp terminal the same
    as other terminal apps.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit fb243a2
Author: David Vo <[email protected]>
Date:   Sun Jul 7 01:57:06 2024 +1000

    file_manager: Check tag before querying current path (talonhub#1442)

    Also bugfix the clearing of the current page numbers.

commit 3d5e77d
Author: Schwa Aresty <[email protected]>
Date:   Sat Jul 6 08:55:52 2024 -0700

    Allow formatting of abbreviations (talonhub#1427)

    - All abbreviations are currently lowercase
    - It is useful to be able to add them with formatting
    - This makes it possible

    ---------

    Co-authored-by: Nicholas Riley <[email protected]>
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit 73bb39e
Author: Andreas Arvidsson <[email protected]>
Date:   Sat Jul 6 17:53:54 2024 +0200

    Added edit paragraph actions and commands (talonhub#1432)

    Co-authored-by: Nicholas Riley <[email protected]>

commit 4e4bfe8
Author: FireChickenProductivity <[email protected]>
Date:   Sat Jul 6 09:27:49 2024 -0600

    Add tag for disabling screenshots (Part of the Better Exam Support Project) (talonhub#1470)

    Add the tag user.disable_screenshots to make it easier for users to
    disable screenshot commands in certain circumstances. This was part of
    the project discussed in a community meeting to add built in
    functionality to community itself to make it easier to disable certain
    commands under specific circumstances, such as when taking an exam.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit 772d51e
Author: Andreas Arvidsson <[email protected]>
Date:   Sat Jul 6 11:07:01 2024 +0200

    Fix bug where you couldn't select help context by index (talonhub#1478)

    This broke in a recent update.

commit 0ceadc1
Author: Phil Cohen <[email protected]>
Date:   Fri Jul 5 10:55:25 2024 -0700

    functions: remove unused `setting_` module variables (talonhub#1475)

    A tiny cleanup in line with the recommendation I pushed to @CodesAway's
    talonhub#1474.

    With the move to `settings.get()`, we should no longer assign settings
    to module-level variables, since it's no longer needed, and we don't
    want anyone to use them by mistake. These aren't being used, so let's
    just remove them.

    This means you can now grep for `= mod.setting(` to search for old
    usages, and it comes up clean on main.

    (To my surprise, this code was using `settings.get()` from the beginning
    when @wenkokke wrote it)

commit a3fab3e
Author: Amy Brennan-Luna <[email protected]>
Date:   Thu Jul 4 20:30:17 2024 -0500

    draft_talon_helpers: migrate away from deprecated settings usage (talonhub#1474)

    Fixed warning about using `setting.get()`
    Changed to use `settings.get(setting_name)`

    Closes talonhub#1473
    See also talonhub#1351,
    talonhub#1349

    ---------

    Co-authored-by: Phil Cohen <[email protected]>

commit dd52745
Author: Andreas Arvidsson <[email protected]>
Date:   Mon Jul 1 18:05:43 2024 +0200

    Sort help contexts by specificity (talonhub#1460)

    Instead of just sorting the help context alphabetically we now first
    sort them by context match specificity. Context with equal specificity
    are sorted alphabetically.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: David Vo <[email protected]>
    Co-authored-by: Nicholas Riley <[email protected]>

commit fd17764
Author: Schwa Aresty <[email protected]>
Date:   Mon Jul 1 02:12:38 2024 -0700

    Adds a helper to run tasks (talonhub#1414)

commit c495097
Author: Andreas Arvidsson <[email protected]>
Date:   Sun Jun 30 03:48:47 2024 +0200

    Added mute/microphone disabled to mode indicator (talonhub#1466)

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Phil Cohen <[email protected]>

commit 6a25790
Author: Amy Brennan-Luna <[email protected]>
Date:   Sat Jun 29 20:36:55 2024 -0500

    Update python.py (talonhub#1469)

    Added break / continue for statements (similar to other languages)

    Closes talonhub#1468

commit 5a97058
Author: Andreas Arvidsson <[email protected]>
Date:   Mon Jun 24 10:56:22 2024 +0200

    Added notepad application context (talonhub#1464)

commit b337c21
Author: Schwa Aresty <[email protected]>
Date:   Sat Jun 22 08:33:17 2024 -0700

    Adds a helper to format and paste (talonhub#1454)

    - for example try 'string paste' to paste something as a string

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit d91cf83
Author: Andreas Arvidsson <[email protected]>
Date:   Sat Jun 22 17:31:06 2024 +0200

    Cancel any current phrase when Talon is waking (talonhub#1435)

    When Talon wakes we set a timestamp threshold. On the next command we
    will compare the phrase timestamp to the threshold and cancel any phrase
    started before wakeup. This is to prevent commands from being executed
    if the user wakes Talon using a noise or keypress.

    ---------

    Co-authored-by: Nicholas Riley <[email protected]>

commit 8a05482
Author: Colton Loftus <[email protected]>
Date:   Sat Jun 22 04:08:59 2024 -0400

    Add a `help snip` command to list snippets currently in scope (talonhub#1462)

    Snippets are very powerful but there is no help menu for them currently.

    This PR adds a simple command to integrate snippets with `help_list`.
    The output of the following is as follows. While it is a bit verbose, it
    doesn't add any extra Python code and it may be helpful sometimes to
    know what snippet is being mapped to which spoken form if the spoken
    form is not clear/semantic for some reason.

    I placed the help command for snippets in the `help.talon` following the
    convention of other help commands.

    ![An image showing the output table of `help snip`. The left column is
    the underlying snippet title and the right is the spoken
    form.](https://github.com/talonhub/community/assets/70598503/f99b5c0d-bd43-42b4-a0eb-f681eab07a67)

commit 6f2fa2b
Author: maxbruening <[email protected]>
Date:   Mon Jun 17 18:52:47 2024 +0200

    tab clone in tag: user.tabs (talonhub#1457)

    I propose to allow users to also say "tab clone". This would make the
    command consistent with rango. This will become particularly useful
    once/if community has more applications/contexts that support the "tab
    duplicate" voice command. Background: I was planning on implementing the
    command for windows explorer.

    To enable compatibility with rango I also created a complementary pull
    request on that repository: [PR
    13](david-tejada/rango-talon#13)

commit 5fb2f7f
Author: Colton Loftus <[email protected]>
Date:   Mon Jun 17 03:57:29 2024 -0400

    Use active list with help_list (talonhub#1461)

    Currently if the user uses `user.help_list()` and passes in a list with
    multiple implementations, the first list will always be chosen by virtue
    of the code using index `[0]`. However, it should show the currently
    active implementation by using `[-1]`. This is probably unintended
    behavior.

    Without this change, it is impossible to use `user.help_list` with the
    `user.snippet` list that is contextually overridden based on programming
    language type. I would like to add a `help snip` command and that would
    depend on this.

commit 93c9261
Author: Andreas Arvidsson <[email protected]>
Date:   Thu Jun 13 14:08:34 2024 +0200

    Add speech timeout to settings file (talonhub#1459)

    This is such a common question people have. I definitely believe we
    should make it easier for them.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit 39bed39
Author: Schwa Aresty <[email protected]>
Date:   Mon Jun 10 03:12:08 2024 -0700

    Add then command from cursorless recommendations (talonhub#1394)

    The recommendation comes from
    [here](https://github.com/cursorless-dev/cursorless/wiki/Common-recommendations)

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Phil Cohen <[email protected]>

commit d1bc894
Author: Trillium S <[email protected]>
Date:   Thu Jun 6 17:15:21 2024 -0700

    feat: Add dark_mode option in settings (talonhub#1453)

    Just learned that dark_mode exists, would like to have an easier
    settings option for users.

commit 6fcd300
Author: maxbruening <[email protected]>
Date:   Thu Jun 6 02:32:15 2024 +0200

    stata support (talonhub#1401)

    Adds support for the stata language and application.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit 47c2257
Author: Schwa Aresty <[email protected]>
Date:   Mon Jun 3 17:25:21 2024 -0700

    Add helper to go to the middle of a line (talonhub#1424)

    Adds a line command `[go] line mid` which is similar to vim's `gm` command and
    moves the cursor to the middle of the line.

    ---------

    Co-authored-by: Nicholas Riley <[email protected]>
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit 235bba4
Author: Schwa Aresty <[email protected]>
Date:   Mon Jun 3 05:07:10 2024 -0700

    Add vscode terminal helper (talonhub#1395)

    It makes sense that the VSCode terminal should behave like a terminal.
    There's also a corresponding setting that needs to be set in VSCode. cc:
    @pokey

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Pokey Rule <[email protected]>

commit 43974b9
Author: Schwa Aresty <[email protected]>
Date:   Sun Jun 2 07:41:56 2024 -0700

    Add menu choosing helper from pokey_talon (talonhub#1393)

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit 71ab00a
Author: David Vo <[email protected]>
Date:   Mon Jun 3 00:38:09 2024 +1000

    Delete dead Windows-specific code (talonhub#1441)

commit 879ab2c
Author: Schwa Aresty <[email protected]>
Date:   Sun Jun 2 07:32:59 2024 -0700

    Add space after Kotlin keywords so that you can chain in keyword commands (talonhub#1429)

    Co-authored-by: Nicholas Riley <[email protected]>

commit 5ebcea7
Author: maxbruening <[email protected]>
Date:   Sat Jun 1 04:54:47 2024 +0200

    Creates the "find" tag and removes that functionality from "find_and_replace" (talonhub#1404)

    The idea is to have a separate "find" tag for very basic search
    functionality. The reason is that there are many types of applications
    that are mostly view only (webbrowsers, pdf readers, etc.). These
    applications would not benefit from the full functionality of the
    "find_and_replace" tag.

    In order not to define some voice commands twice, I made the
    "find_and_replace" tag automatically activate the new "find" tag as well
    and removed what would have been duplicate definitions.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Nicholas Riley <[email protected]>

commit 18c0aa4
Author: Michael Arntzenius <[email protected]>
Date:   Sat Jun 1 03:46:41 2024 +0100

    More emacs commands, including xref commands (go-to-definition) (talonhub#1443)

    Adds more emacs commands, mostly `xref` commands but also `other-frame`
    and `visit-tags-table`. Also sorts `emacs_commands.csv`.

commit 15d4fdc
Author: Michael Arntzenius <[email protected]>
Date:   Sun May 26 15:10:34 2024 +0100

    allow "help last" as synonym for "help previous" (talonhub#1444)

commit 98021b1
Author: David Vo <[email protected]>
Date:   Sun May 26 18:17:19 2024 +1000

    imperative: Add `state match` alias for Python/Rust (talonhub#1440)

    In Python and Rust, we've implemented `code_state_switch()` to insert
    the `match` keyword. Give it that name too.

commit 86bb196
Author: Samuel Cole <[email protected]>
Date:   Mon May 13 12:02:26 2024 -0500

    Get vscode.py to recognize cursor IDE for macos (talonhub#1436)

commit 6ee7c72
Author: Nicholas Riley <[email protected]>
Date:   Sat May 11 13:23:35 2024 -0400

    Update talonfmt (talonhub#1434)

    Update the version of talonfmt to (hopefully) remedy the compatibility
    issue breaking CI.

    (refs talonhub#1430)

commit 027d7d0
Author: Michael Arntzenius <[email protected]>
Date:   Tue Apr 23 18:54:13 2024 +0100

    micro-optimization for dictation_insert (talonhub#1422)

commit 23e371f
Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date:   Sun Apr 21 16:05:11 2024 -0400

    [pre-commit.ci] pre-commit autoupdate (talonhub#1417)

commit 1f3499a
Author: maxbruening <[email protected]>
Date:   Sun Apr 21 21:18:44 2024 +0200

    define "zoom reset" for VSCode (talonhub#1420)

    The default value for "zoom reset" defined in edit_win.py is "ctrl-0".
    This does not work in VS Code. The PR attempts to fix this.

commit eeb7a93
Author: Andreas Arvidsson <[email protected]>
Date:   Tue Apr 16 16:07:17 2024 +0200

    Get snippets actions (talonhub#1315)

    Added actions to get insertion and wrapper snippet content(body, scope,
    etc). This will be used by example cursorless to leverage the community
    snippets

    Follow up from:
    talonhub#1305

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Pokey Rule <[email protected]>

commit 801afdd
Author: Schwa Aresty <[email protected]>
Date:   Sun Apr 14 18:45:51 2024 -0700

    Add basic kotlin support (talonhub#1408)

    - Borrowed from
    [here](okonomichiyaki@6542dc3)

    Addresses talonhub#1406

    ---------

    Co-authored-by: okonomichiyaki <[email protected]>
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Jeff Knaus <[email protected]>

commit 93731ec
Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date:   Sun Apr 14 18:20:06 2024 -0400

    [pre-commit.ci] pre-commit autoupdate (talonhub#1413)

    <!--pre-commit.ci start-->
    updates:
    - [github.com/pre-commit/pre-commit-hooks: v4.5.0 →
    v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)
    <!--pre-commit.ci end-->

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit 5e1e579
Author: maxbruening <[email protected]>
Date:   Mon Apr 15 00:19:09 2024 +0200

    Support for Foxit Reader for PDFs (talonhub#1403)

    Adds basic support for the foxit reader on windows.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Jeff Knaus <[email protected]>

commit 679bdfb
Author: maxbruening <[email protected]>
Date:   Sun Apr 14 21:32:01 2024 +0200

    Meld (talonhub#1402)

commit afb2246
Author: Schwa Aresty <[email protected]>
Date:   Sun Apr 14 12:26:19 2024 -0700

    Add vscode command to search for views by name (talonhub#1390)

commit 4c1c9af
Author: Jeff Knaus <[email protected]>
Date:   Sat Apr 13 11:29:25 2024 -0400

    Talon v0.4 support: common commands for talon python / talon files / .talon-list files (talonhub#1240)

    Splitting talonhub#1234 into a few
    pull requests for convenience. This is not fully vetted yet, opening a
    draft for convenience and initial discussion.

    - Support for common commands when composing talon-list, .talon, and
    talon .py
    - Support for the talon debug window, with commands consistent with
    other existing commands

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Nicholas Riley <[email protected]>

commit 1464ace
Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date:   Sun Apr 7 00:10:44 2024 -0400

    [pre-commit.ci] pre-commit autoupdate (talonhub#1389)

    <!--pre-commit.ci start-->
    updates:
    - [github.com/psf/black-pre-commit-mirror: 24.1.1 →
    24.3.0](psf/black-pre-commit-mirror@24.1.1...24.3.0)
    - [github.com/Lucas-C/pre-commit-hooks: v1.5.4 →
    v1.5.5](Lucas-C/pre-commit-hooks@v1.5.4...v1.5.5)
    <!--pre-commit.ci end-->

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

commit 05f1d83
Author: Chris Hall <[email protected]>
Date:   Sat Apr 6 22:55:03 2024 +1100

    formatters: new conga formatter, renamed formatters for consistency. (talonhub#1355)

    previously:
     - SLASH_SEPARATED includes a prefix slash, unlike other *_SEPARATED.

    now:
     - renamed SLASH_SEPARATED to ALL_SLASHES
     - added new SLASH_SEPARATED matching *_SEPARATED behavior.
     - added new command `conga` (for 'conga line') for SLASH_SEPARATED.

commit 1ebc040
Author: Mikhail Menshchikov <[email protected]>
Date:   Sat Apr 6 13:53:49 2024 +0200

    Turning off listening mode after a timeout (talonhub#1320)

    Added a setting that allows to put Talon into Sleep mode automatically
    after a certain timeout expressed in minutes.
    On timeout the large notification "sleep mode" is shown at the center of
    the main screen to indicate mode change.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Jeff Knaus <[email protected]>

commit de711f0
Author: Ross <[email protected]>
Date:   Sat Apr 6 13:35:52 2024 +0200

    Catch redundant sleep/wake commands, and notify the user that Talon is already in the requested mode (talonhub#1327)

    This commit adds some commands to catch redundant sleep/wake commands,
    and notifies the user.
    The main example is, if Talon is already awake, the "talon wake" and
    "wake up" commands aren't active. So if the user is unsure of their
    current mode and says "wake up", Talon interprets the command as
    something else ("page up", for example).
    These new commands are active in the mode the user is trying to
    activate. They catch the command, and trigger an `app.notify` to let the
    user know they're already in that mode.

    Before talonhub#1215, these were bound
    with `mode: all`, so using them in the wrong mode would still be
    recognized, but just no-op.

    ---------

    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Phil Cohen <[email protected]>
    Co-authored-by: Jeff Knaus <[email protected]>

commit aaa62f0
Author: timo <[email protected]>
Date:   Sun Mar 31 19:34:51 2024 +0200

    add lowercased firefox-esr to firefox.py (talonhub#1410)
  • Loading branch information
Mark-Phillipson committed Jul 22, 2024
1 parent 14d38b9 commit aed1b77
Show file tree
Hide file tree
Showing 103 changed files with 1,836 additions and 250 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
minimum_pre_commit_version: "3.2.0"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down Expand Up @@ -35,18 +35,18 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
rev: 24.4.0
hooks:
- id: black
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
rev: v1.5.5
hooks:
- id: remove-tabs
types: [file]
files: \.talon$
args: ["--whitespaces-count=4"]
- repo: https://github.com/wenkokke/talonfmt
rev: 1.10.1
rev: 1.10.2
hooks:
- id: talonfmt
args: ["--in-place"]
1 change: 1 addition & 0 deletions BREAKING_CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ applied given the delay between changes being submitted and the time they were r
and merged.

---
* 2024-05-30 Deprecate 'drop down <user.number_small>' in favor of overridable 'choose' helper
* 2024-01-27 Deprecate '<user.number_string>' command without a spoken prefix like `numb`.
See `numbers.talon` and `numbers_unprefixed.talon.` If in the future you want to still use
unprefixed numbers, you will need to comment out the
Expand Down
6 changes: 5 additions & 1 deletion apps/eclipse/eclipse_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def split_window():

# splits.py support end

# find_and_replace.py support begin
# find.py support begin

def find(text: str):
"""Triggers find in current editor"""
Expand All @@ -125,6 +125,10 @@ def find_next():
def find_previous():
actions.key("shift-enter")

# find.py support end

# find_and_replace.py support begin

def find_everywhere(text: str):
"""Triggers find across project"""
actions.key("ctrl-h")
Expand Down
13 changes: 12 additions & 1 deletion apps/emacs/emacs.talon
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,16 @@ rectangle (yank | paste): user.emacs("yank-rectangle")
rectangle copy: user.emacs("copy-rectangle-as-kill")
rectangle number lines: user.emacs("rectangle-number-lines")

# ----- XREF SUPPORT ----- #
[xref] find definition: user.emacs("xref-find-definitions")
[xref] find definition other window: user.emacs("xref-find-definitions-other-window")
[xref] find definition other frame: user.emacs("xref-find-definitions-other-frame")
[xref] find references: user.emacs("xref-find-references")
[xref] find references [and] replace: user.emacs("xref-find-references-and-replace")
xref find apropos: user.emacs("xref-find-apropos")
xref go back: user.emacs("xref-go-back")
visit tags table: user.emacs("visit-tags-table")

# ----- PROJECT SUPPORT ----- #
project [find] file: user.emacs("project-find-file")
project [find] (regex | grep): user.emacs("project-find-regexp")
Expand Down Expand Up @@ -324,7 +334,8 @@ merge next: user.emacs("smerge-next")
merge last: user.emacs("smerge-prev")
merge keep upper: user.emacs("smerge-keep-upper")
merge keep lower: user.emacs("smerge-keep-lower")
merge keep this: user.emacs("smerge-keep-current")
merge keep base: user.emacs("smerge-keep-base")
merge keep (this | current): user.emacs("smerge-keep-current")
merge refine: user.emacs("smerge-refine")
merge split: user.emacs("smerge-resolve")

Expand Down
11 changes: 10 additions & 1 deletion apps/emacs/emacs_commands.csv
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ global-hl-line-mode,, g-hl-l-m
global-visual-line-mode,, gl-v-l-m
goto-line, meta-g meta-g
highlight-lines-matching-regexp, meta-s h l
highlight-regexp, meta-s h r
highlight-phrase, meta-s h p
highlight-regexp, meta-s h r
hl-line-mode,, hl-l-m
indent-region, meta-ctrl-\
indent-rigidly, ctrl-x tab
Expand Down Expand Up @@ -102,6 +102,7 @@ next-buffer, ctrl-x right
next-error, meta-g n
occur, meta-s o
open-rectangle, ctrl-x r o
other-frame, ctrl-x 5 o
other-window, ctrl-x o
outline-backward-same-level, ctrl-c @ ctrl-b
outline-demote, ctrl-c @ ctrl->
Expand Down Expand Up @@ -214,9 +215,17 @@ unhighlight-regexp, meta-s h u
universal-argument, ctrl-u
vc-annotate, ctrl-x v g
view-lossage, ctrl-h l
visit-tags-table,, v-t-t
visual-line-mode,, visu-l-m
whitespace-cleanup,, wh-cl
whitespace-mode,, white-m
widen, ctrl-x n w
xref-find-apropos, meta-ctrl-.
xref-find-definitions, meta-.
xref-find-definitions-other-frame, ctrl-x 5 .
xref-find-definitions-other-window, ctrl-x 4 .
xref-find-references, meta-?
xref-find-references-and-replace
xref-go-back,"meta-,"
yank, ctrl-y
yank-rectangle, ctrl-x r y
6 changes: 0 additions & 6 deletions apps/finder/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ class UserActions:
def file_manager_open_parent():
actions.key("cmd-up")

def file_manager_go_forward():
actions.key("cmd-]")

def file_manager_go_back():
actions.key("cmd-[")

def file_manager_current_path():
title = ui.active_window().title

Expand Down
1 change: 1 addition & 0 deletions apps/firefox/firefox.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
apps.firefox = "app.name: Firefox Developer Edition"
apps.firefox = "app.name: firefox"
apps.firefox = "app.name: Firefox-esr"
apps.firefox = "app.name: firefox-esr"
apps.firefox = "app.name: LibreWolf"
apps.firefox = "app.name: waterfox"
apps.firefox = """
Expand Down
64 changes: 64 additions & 0 deletions apps/foxit_reader/foxit_reader.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
from talon import Context, Module, actions

mod = Module()
ctx = Context()

# --- App definition ---
mod.apps.foxit_reader = r"""
os: windows
and app.name: /^Foxit Reader/
os: windows
and app.exe: /^foxitreader\.exe$/i
os: windows
and app.name: Foxit PDF Reader
os: windows
and app.exe: /^foxitpdfreader\.exe$/i
"""
# Context matching
ctx.matches = """
app: foxit_reader
"""


@ctx.action_class("app")
class AppActions:
# app.tabs
def tab_open():
actions.key("ctrl-o")

def tab_reopen():
actions.app.notify("Foxit does not support this action.")


@ctx.action_class("user")
class UserActions:
# user.tabs
def tab_jump(number):
actions.app.notify("Foxit does not support this action.")

def tab_final():
actions.app.notify("Foxit does not support this action.")

def tab_duplicate():
actions.app.notify("Foxit does not support this action.")

# user.pages
def page_current() -> int:
actions.key("ctrl-g")
page = actions.edit.selected_text()
return int(page)

def page_next():
actions.key("right")

def page_previous():
actions.key("left")

def page_jump(number: int):
actions.key("ctrl-g")
actions.insert(str(number))
actions.key("enter")

def page_final():
# actions.key("fn-right")
actions.key("end")
11 changes: 11 additions & 0 deletions apps/foxit_reader/foxit_reader.talon
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
app: foxit_reader
-
tag(): user.tabs
tag(): user.pages

tab close all: key(ctrl-shift-w)

[page] rotate right: key("shift-ctrl-keypad_equals")
[page] rotate left: key("shift-ctrl-keypad_minus")

go back: key(alt-left)
44 changes: 44 additions & 0 deletions apps/meld/meld.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from talon import Context, Module, actions

mod = Module()
ctx = Context()

apps = mod.apps
apps.meld = """
os: windows
and app.name: Visual diff and merge tool
os: windows
and app.exe: meld.exe
"""

ctx.matches = r"""
app: meld
"""


@ctx.action_class("app")
class AppActions:
def tab_open():
actions.key("ctrl-n")

def tab_previous():
actions.key("ctrl-alt-pageup")

def tab_next():
actions.key("ctrl-alt-pagedown")

def tab_reopen():
print("Meld does not support this action.")


@ctx.action_class("user")
class UserActions:
def tab_jump(number):
if number < 10:
actions.key(f"alt-{number}")

def tab_final():
print("Meld does not support this action.")

def tab_duplicate():
print("Meld does not support this action.")
6 changes: 6 additions & 0 deletions apps/meld/meld.talon
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
app: meld
-
tag(): user.tabs

change next: key(alt-down)
change (previous | last): key(alt-up)
7 changes: 4 additions & 3 deletions apps/nautilus/nautilus.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ class UserActions:
def tab_jump(number: int):
actions.key(f"alt-{number}")

# user.file_manager
def file_manager_go_back():
# user.navigation
def go_back():
actions.key("alt-left")

def file_manager_go_forward():
def go_forward():
actions.key("alt-right")

# user.file_manager
def file_manager_open_parent():
actions.key("alt-up")

Expand Down
6 changes: 5 additions & 1 deletion apps/notepad++/notepad++_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def tab_final():
print("Notepad doesn't support this...")
# actions.key("ctrl-numpad_0")

# find_and_replace.py support begin
# find.py support begin

def find(text: str):
"""Triggers find in current editor"""
Expand All @@ -111,6 +111,10 @@ def find_next():
def find_previous():
actions.key("shift-enter")

# find.py support end

# find_and_replace.py support begin

def find_everywhere(text: str):
"""Triggers find across project"""

Expand Down
22 changes: 22 additions & 0 deletions apps/notepad/notepad.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from talon import Context, Module, actions

ctx = Context()
mod = Module()

mod.apps.notepad = r"""
os: windows
and app.exe: notepad.exe
"""

ctx.matches = r"""
app: notepad
"""


@ctx.action_class("win")
class win_actions:
def filename():
filename = actions.win.title().split(" - ")[0]
if "." in filename:
return filename
return ""
5 changes: 5 additions & 0 deletions apps/notepad/notepad.talon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
app: notepad
-

tag(): user.tabs
tag(): user.find_and_replace
4 changes: 0 additions & 4 deletions apps/powershell/powershell_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ def file_manager_refresh_title():
"$Host.UI.RawUI.WindowTitle = 'Windows PowerShell: ' + $(get-location)"
)
actions.key("enter")
# action(user.file_manager_go_back):
# key("alt-left")
# action(user.file_manager_go_forward):
# key("alt-right")

def file_manager_open_parent():
actions.insert("cd ..")
Expand Down
21 changes: 21 additions & 0 deletions apps/stata/stata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from talon import Context, Module

mod = Module()
ctx = Context()

mod.apps.stata = r"""
os: windows
and app.name: Stata
os: windows
and app.exe: /^statase\-64\.exe$/i
"""

ctx.matches = r"""
app: stata
"""


@ctx.action_class("code")
class CodeActions:
def language():
return "stata"
25 changes: 25 additions & 0 deletions apps/stata/stata_do_file_editor.talon
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Commands for the Stata Do-File Editor
os: windows
app: stata
win.title: /^Do-file Editor/
-
do this: key(ctrl-d)

do line:
edit.select_line()
key(ctrl-d)

do (all | file):
edit.select_all()
edit.copy()
key(ctrl-d)

do way up:
edit.extend_file_start()
edit.copy()
key(ctrl-d)

do way down:
edit.extend_file_end()
edit.copy()
key(ctrl-d)
Loading

0 comments on commit aed1b77

Please sign in to comment.