https://github.com/bilal-fazlani/swiftbar4s
SwiftBar4s is a scala framework to create SwiftBar plugins for MacOS
https://github.com/bilal-fazlani/swiftbar4s
bitbar bitbar-plugin dotty plugin scala swiftbar
Last synced: about 1 month ago
JSON representation
SwiftBar4s is a scala framework to create SwiftBar plugins for MacOS
- Host: GitHub
- URL: https://github.com/bilal-fazlani/swiftbar4s
- Owner: bilal-fazlani
- License: mit
- Created: 2020-12-05T18:55:25.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-16T13:31:20.000Z (over 1 year ago)
- Last Synced: 2025-03-05T16:14:31.474Z (3 months ago)
- Topics: bitbar, bitbar-plugin, dotty, plugin, scala, swiftbar
- Language: Scala
- Homepage: https://swiftbar4s.bilal-fazlani.com
- Size: 5.56 MB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftBar4s is a scala framework to create [swiftbar](https://github.com/swiftbar/SwiftBar) plugins for MacOS


# Documentation
## https://swiftbar4s.bilal-fazlani.com
# Usage
```scala
import com.bilalfazlani.swiftbar4s.dsl.*object SimplePlugin extends PluginDsl {
handler {
handle("send-email") { emailMayBe =>
println(s"email sent to $emailMayBe")
}handle("print-hello") {
println("hello world")
}
}menu("my-plugin", color = "red,green") {
action("send email", "send-email", Some("[email protected]"), true)
action("print hello", "print-hello", showTerminal = true)
text("item 1", font = "Times")
---text("item 2", textSize = 15)
subMenu("submenu"){
text("item 3", length = 4)
text("item 4")
Range(5,10).foreach{ i =>
link(s"item $i", "http://google.com")
}
subMenu("nested", color = "orange"){
text("item 10")
---text("item 11")
shellCommand("item 12", "echo", showTerminal = true ,params = "hello world", "sds")
}
}
}
}
```
You can create text, web links, shell commands and plugin actions.
All the items support configurations such as color, text size, image, emojis etc.