Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom plugin repository support #351

Closed
melonamin opened this issue Nov 18, 2022 · 6 comments
Closed

Add custom plugin repository support #351

melonamin opened this issue Nov 18, 2022 · 6 comments
Labels
enhancement New feature or request
Milestone

Comments

@melonamin
Copy link
Contributor

melonamin commented Nov 18, 2022

As discussed in #342

Set custom plugin repository url with: defaults write com.ameba.SwiftBar PluginRepositoryURL http://localhost:8000/

Use this archive as an example:

unzip "sb plugin repo.zip"
cd "sb plugin repo.zip"
python3 -m http.server
@melonamin melonamin added the enhancement New feature or request label Nov 18, 2022
@melonamin melonamin added this to the 1.5.0 milestone Nov 18, 2022
@melonamin melonamin changed the title Decouple plugin repository from http://xbarapp.com Add custom plugin repository support Nov 19, 2022
@melonamin
Copy link
Contributor Author

@futurist see above and try this beta build

@melonamin
Copy link
Contributor Author

@futurist do you have any feedback yet?

@futurist
Copy link
Contributor

futurist commented Jan 1, 2023

@melonamin cool job! Just a little thing, I saw in the sb plugin repo.zip folder, AWS/elb.30s.sh and AWS/plugins.json both have the same script content, is it a bit redundant? I think that will be confused when try to add/update plugins.

@melonamin
Copy link
Contributor Author

Script content in AWS/plugins.json is not used and can be omitted. This is just an as-is state, that I got from xbar.

@futurist
Copy link
Contributor

futurist commented Jan 2, 2023

@melonamin I've tested and it's worked! thanks for the job!

@futurist
Copy link
Contributor

futurist commented Feb 3, 2023

@melonamin After tried again, found some issues:

  1. If domain not localhost, seems cannot reached, no http request to the pluginHost.
  2. In the plugin tab, click on "Source<>" button, will jump to https://github.com/matryer/xbar-plugins website.

The GetPlugin window always loading if using customized domains(non-localhost, both http/https tried).

Update:

After several tries, I found the pluginHost url cannot have subPaths, like "http://xxx.com/repo/", that's why for the first issue.
I think this restriction can be added to the document maybe, or can it be supported if possible?

The second issue, maybe related below code:

        var gitHubURL: URL? {
            URL(string: "https://github.com/matryer/xbar-plugins/blob/master/\(path)")
        }

It's like hard-coded, can it be a preference also? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants