Update README.md

This commit is contained in:
Alex Mazanov 2020-11-21 17:13:39 -05:00 committed by GitHub
parent 8e6faff1cb
commit e0218d73dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,14 @@ Runs on macOS Catalina(10.15) and up.
- Open SwiftBar/SwiftBar.xcodeproj
- Press play
## Plugin Repository
SwiftBar bundled with Plugin Repository, you can access it at Swiftbar -> Get Plugins...
<p align="center">
<img width="600" height="500" src="Resources/Plugin Repository.jpg">
</p>
## Creating Plugins
@ -35,6 +43,26 @@ With the first launch, Swiftbar will ask you to set the `Plugin Folder`, SwiftBa
* hidden folders are ignored
* nested folders are traversed by SwiftBar
### Plugin Naming
Plugin files must adopt the following format:
```
{name}.{time}.{ext}
```
* name - anything you want
* time - resresh interval, should be a number + duration modifier(see below)
* ext - file extension
Duration modifier:
* s - seconds, i.e. 1s - refresh every second
* m - minute, i.e. 10m - refresh every ten minutes
* h - hour, i.e. 3h - refresh every three hours
* d - day, i.e. 1d - refresh every day
Example filename: `date.1m.sh`
## Plugin API
Plugin is an executable script in the language of your choice. When SwiftBar detects a new file in `Plugin Folder` it makes this file executable if needed and runs it.