feat: scaffold owlry-plugins workspace
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/target
|
||||
**/*.rs.bk
|
||||
32
Cargo.toml
Normal file
32
Cargo.toml
Normal file
@@ -0,0 +1,32 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"crates/owlry-plugin-bookmarks",
|
||||
"crates/owlry-plugin-calculator",
|
||||
"crates/owlry-plugin-clipboard",
|
||||
"crates/owlry-plugin-emoji",
|
||||
"crates/owlry-plugin-filesearch",
|
||||
"crates/owlry-plugin-media",
|
||||
"crates/owlry-plugin-pomodoro",
|
||||
"crates/owlry-plugin-scripts",
|
||||
"crates/owlry-plugin-ssh",
|
||||
"crates/owlry-plugin-system",
|
||||
"crates/owlry-plugin-systemd",
|
||||
"crates/owlry-plugin-weather",
|
||||
"crates/owlry-plugin-websearch",
|
||||
"crates/owlry-lua",
|
||||
"crates/owlry-rune",
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
edition = "2024"
|
||||
rust-version = "1.90"
|
||||
license = "GPL-3.0-or-later"
|
||||
repository = "https://somegit.dev/Owlibou/owlry-plugins"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
panic = "abort"
|
||||
strip = true
|
||||
opt-level = "z"
|
||||
57
README.md
Normal file
57
README.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# owlry-plugins
|
||||
|
||||
Official plugins and script runtimes for [owlry](https://somegit.dev/Owlibou/owlry).
|
||||
|
||||
## Plugins
|
||||
|
||||
| Plugin | Description |
|
||||
|--------|-------------|
|
||||
| calculator | Mathematical expression evaluation |
|
||||
| bookmarks | Browser bookmark search (Firefox, Chrome) |
|
||||
| clipboard | Clipboard history via cliphist |
|
||||
| emoji | Emoji picker |
|
||||
| filesearch | File search via fd/locate |
|
||||
| media | MPRIS media player widget |
|
||||
| pomodoro | Pomodoro timer widget |
|
||||
| scripts | User script launcher |
|
||||
| ssh | SSH host quick-connect |
|
||||
| system | Power and session management |
|
||||
| systemd | systemd user service control |
|
||||
| weather | Weather widget |
|
||||
| websearch | Web search with configurable engines |
|
||||
|
||||
## Runtimes
|
||||
|
||||
| Runtime | Description |
|
||||
|---------|-------------|
|
||||
| owlry-lua | Lua 5.4 scripting runtime for user plugins |
|
||||
| owlry-rune | Rune scripting runtime for user plugins |
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
just build # Debug build
|
||||
just release # Release build (optimized)
|
||||
just plugin calc # Build a single plugin
|
||||
just check # cargo check + clippy
|
||||
just test # Run tests
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
just install-local # Install all plugins and runtimes to /usr/lib/owlry/
|
||||
```
|
||||
|
||||
Plugins are compiled as `.so` files and installed to `/usr/lib/owlry/plugins/`.
|
||||
Runtimes are installed to `/usr/lib/owlry/runtimes/`.
|
||||
|
||||
## Development
|
||||
|
||||
See [docs/PLUGIN_DEVELOPMENT.md](docs/PLUGIN_DEVELOPMENT.md) for plugin authoring guide.
|
||||
|
||||
Plugins depend on `owlry-plugin-api` from the core repo for the ABI-stable interface.
|
||||
|
||||
## License
|
||||
|
||||
GPL-3.0-or-later
|
||||
52
justfile
Normal file
52
justfile
Normal file
@@ -0,0 +1,52 @@
|
||||
default:
|
||||
@just --list
|
||||
|
||||
build:
|
||||
cargo build --workspace
|
||||
|
||||
release:
|
||||
cargo build --workspace --release
|
||||
|
||||
check:
|
||||
cargo check --workspace
|
||||
cargo clippy --workspace
|
||||
|
||||
test:
|
||||
cargo test --workspace
|
||||
|
||||
fmt:
|
||||
cargo fmt --all
|
||||
|
||||
plugin name:
|
||||
cargo build -p owlry-plugin-{{name}} --release
|
||||
|
||||
plugins:
|
||||
cargo build --workspace --release
|
||||
|
||||
show-versions:
|
||||
@for dir in crates/owlry-plugin-* crates/owlry-lua crates/owlry-rune; do \
|
||||
name=$$(basename $$dir); \
|
||||
version=$$(grep '^version' $$dir/Cargo.toml | head -1 | cut -d'"' -f2); \
|
||||
printf "%-35s %s\n" "$$name" "$$version"; \
|
||||
done
|
||||
|
||||
bump-crate crate new_version:
|
||||
@cd crates/{{crate}} && \
|
||||
sed -i 's/^version = ".*"/version = "{{new_version}}"/' Cargo.toml
|
||||
@echo "Bumped {{crate}} to {{new_version}}"
|
||||
|
||||
bump-all new_version:
|
||||
@for dir in crates/owlry-plugin-* crates/owlry-lua crates/owlry-rune; do \
|
||||
sed -i 's/^version = ".*"/version = "{{new_version}}"/' $$dir/Cargo.toml; \
|
||||
done
|
||||
@echo "Bumped all crates to {{new_version}}"
|
||||
|
||||
install-local:
|
||||
just plugins
|
||||
@for f in target/release/libowlry_plugin_*.so; do \
|
||||
sudo install -Dm755 "$$f" /usr/lib/owlry/plugins/$$(basename "$$f"); \
|
||||
done
|
||||
@for f in target/release/libowlry_lua.so target/release/libowlry_rune.so; do \
|
||||
[ -f "$$f" ] && sudo install -Dm755 "$$f" /usr/lib/owlry/runtimes/$$(basename "$$f"); \
|
||||
done
|
||||
@echo "Installed all plugins and runtimes"
|
||||
Reference in New Issue
Block a user