Skip to content

Commit

Permalink
Add support for the Orion browser (#1217)
Browse files Browse the repository at this point in the history
[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
antonio and pre-commit-ci[bot] committed Jul 2, 2023
1 parent 7cf33e2 commit fc5aa3d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
45 changes: 45 additions & 0 deletions apps/orion/orion.py
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-\\")
6 changes: 6 additions & 0 deletions apps/orion/orion.talon
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()

0 comments on commit fc5aa3d

Please sign in to comment.