commit 07a02b20e79eb8d05efeebaf9f3bd32034cc1a96 Author: vikingowl Date: Thu Mar 26 13:11:18 2026 +0100 feat: scaffold owlry-plugins workspace diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53eaa21 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +**/*.rs.bk diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..58e638d --- /dev/null +++ b/Cargo.toml @@ -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" diff --git a/README.md b/README.md new file mode 100644 index 0000000..45eaeb9 --- /dev/null +++ b/README.md @@ -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 diff --git a/justfile b/justfile new file mode 100644 index 0000000..4a6371b --- /dev/null +++ b/justfile @@ -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"