JayBrown

  • Jun 22, 2024
  • Joined May 11, 2023
  • 3 discussions
  • 4 posts
  • 0 best answers
  • 11 points
  • Another extension that's similar to the deprecated OpenWith is External Application Button: https://github.com/andy-portmen/external-application-button

    Maybe it's helpful to also look at this extension, though it's a lot more complex than OpenWith. Just sending selected text or URLs as is to local scripts (or applications like IINA, VLC etc.) or downloaders like yt-dlp, in a direct and simple manner, should imho be the first step, if this is to be implemented in Orion in some form. If needed, additional settings and tweaks could be added later. (In my view, any complexity & parsing etc. should primarily be added by the user in the local script anyway, not within Orion.)

    • Vlad replied to this.
    • Brief Summary
      Create a new item in Orion Settings under "Browsing" called "History", similar to "Bookmarks" with a checkbox to enable or disable "Open URLs from History in new tab".

      Details:
      Currently, when you select a link from the History menu, Orion will load that page in the currently open/frontmost window/tab, replacing the previously loaded page. It would be nice to have an option in Orion settings, very similar to the Bookmarks option, so that selected links from the browsing history will always open in a new tab.

      I know that you can press the CMD key when selecting links from the browsing history, which will not replace the current tab's contents, and open a new tab instead, but the CMD key functionality is usually reserved for opening new tabs in the background, i.e. not make the new tab the active tab.

      So if the option to "Open URLs from History in new tab" is enabled in Orion settings, the new functionality would be that when you select a link from the browsing history, Orion will create a new tab, make it the active tab, and load the link you selected from the history. If the user presses the CMD key, when selecting a link from the History, Orion will create a new tab, but not make it the active tab, and load the selected page in that tab in the background.

      Conversely, if the option to "Open URLs from History in new tab" is disabled in Orion settings, Orion would behave as it does now: (1) without CMD key will load the new URL in the currently active tab; (2) with CMD key will create a new tab, but not make it active, while loading the page in the background.

      • Steps to reproduce:
        Launch Orion, close all Orion windows without quitting the app, select a link to a page either (a) from the Orion browsing history (menu "History"), but only from the top list, not from any of the older links in the subfolders, or (b) from the "Bookmarks" menu in the subfolders "Favorites" or "Bookmarks Bar".

        Expected behavior:
        If there is no open browser window present, I expect Orion to create a new window with a blank tab, and open the URL selected from the menu "History" or from "Bookmarks Bar" or from "Favorites". Instead, nothing happens. However, if you select a link from one of the subfolders in the "History" menu, e.g. from the dated subfolders or from the "Recently Closed" subfolder, Orion actually does create a new window and opens the link there, so this functionality has been partially implemented.

        So I assume that this is a bug, since that behavior does not work in all cases.

        Orion, OS version; hardware type:
        0.99.124.1-beta (WebKit 616.1.10)
        Intel MacBook Pro 2018
        macOS Ventura 13.4

        • Brief Summary
          Send selected text or an image or a URL, e.g. the current page's URL or a URL from a hyperlink or an image URL, directly to local (shell) scripts without going the additional route via the Services menu and macOS Automator actions.

          Similar functionality
          In Firefox there used to be the OpenWith extension, which still works, but is now discontinued. In browsers that support the macOS Services menu (like Orion), you can use the Services menu to call workflows that contain your script, or that basically run do shell script "/usr/local/bin/myscript.sh"

          Details:
          (1) Select a URL and right-click, or right-click on an image, or right-click on a hyperlink on a page, or select text on a page and right-click, and in the contextual menu don't go into "Services", but instead there's a submenu, e.g. "Execute Local Script…", which has been populated by the user with local (shell) scripts

          (2) In Orion's settings, the user should then have the option to add paths to local (shell) scripts into a list, while the relevant script files can be located either in a dedicated folder managed by Orion (e.g. in ~/Library/Application Scripts/com.kagi.kagimacOS), or in one of the standard paths like /usr/local/bin or ~/.local/bin etc. (A dedicated folder would be safer, I assume.)

          An additional functionality could be to add an individual icon to each added script, e.g. from a png/jpg or SF Symbols, to make the submenu contents look nicer.

          The display name of the script (as the item display name in the contextual submenu) could be determined either by the name of the local script file, or the user could add a display name manually in the script list in Orion's settings.

          In the script settings, users could also add keyboard shortcuts to call a specific script, and if no content or URL has been user-selected beforehand, Orion would then always send the URL of the current page/tab to the script.

          The advantages are probably faster execution (no detour via macOS Services), direct execution without intermediate AppleScript, running a local script detached as much as possible both from the originating app and from the macOS environment (less potential restrictions), support for a lot of script formats, scripting languages, and possibly even compiled executables, and it would be a native & integrated way to run local scripts, which would be a nice companion to Orion's programmable button.

          Nota bene
          If this functionality (running local scripts) is already possible with Orion's programmable button, please disregard my feature suggestion, but afaict the programmable button only runs scripts in-browser (in-tab), right?

          Instead of using the settings, the contextual "Execute Local Script…" submenu contents could also be managed/populated by the user from the programmable button settings, but imho that would compound different functionalities.

          Similar to how xbar works, the user could also configure a script's Orion settings in the script itself, e.g. in comment lines near the top, which Orion would then need to parse & apply, for example:

          #!/bin/zsh
          # OrionScriptDisplayName:Foo Bar
          # OrionScriptDisplayIconFile:/Users/foo/Pictures/Orion/bar.png
          # OrionScriptDisplayIconSFSymbols:foo-bar
          # OrionScriptKeyboardShortcut:CTRL-ALT-CMD-J
          
          # main script

          Image/Video:
          Here's how the contextual submenu looks more or less in Firefox when using the OpenWith extension.

          OpenWithFF