-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
7cf33e2
commit fc5aa3d
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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-\\") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
app: orion | ||
- | ||
tag(): browser | ||
tag(): user.tabs | ||
|
||
tab overview [open | close]: user.overview_tabs() |