Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions plugins/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,41 @@
"desktopWidget"
],
"lastUpdated": "2026-11-24"
},
{
"id": "ryoku-navbar-pets",
"name": "Navbar Pets",
"version": "0.1.0",
"path": "plugins/ryoku-navbar-pets",
"author": "Manish <159711477+mannish01@users.noreply.github.com>",
"upstream": "https://github.com/mannish01/Ryoku-Navbar-Pets",
"summary": "Original pixel-art pets for the Ryoku bar and desktop: eight species, five skies, treats, ball play and head pats.",
"description": "A native Ryoku companion scene with two hosts: a tiny pixel pet in the bar and a matching desktop tile. Eight original 16x16 species, five QML-painted scenic skies, treat chasing with happy particles, a bouncing ball, head pats, adjustable companions and sprite size, and a calm reduced-motion mode. No network, no external commands, no file writes; only settings are persisted through the host API.",
"tags": [
"pets",
"pixel-art",
"companion",
"bar-widget",
"desktop-widget",
"fun"
],
"accent": "#c88a9b",
"surface": "#101010",
"preview": "assets/preview-widget.png",
"screenshots": [
"assets/preview-widget.png",
"assets/preview-panel.png"
],
"manifest": "product-manifest.json",
"manifestSha256": "d5eff5c462e3f35c356ba96507b4b87acabf4e0478f0ab2b62e8c55cd5fc906d",
"official": false,
"tagline": "Pixel-art companions that live in your bar and on your desktop.",
"icon": "pets",
"hosts": [
"topbarGlyph",
"desktopWidget"
],
"lastUpdated": "2026-11-30"
}
]
}
21 changes: 21 additions & 0 deletions plugins/ryoku-navbar-pets/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Manish

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
84 changes: 84 additions & 0 deletions plugins/ryoku-navbar-pets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Navbar Pets for Ryoku

An original pixel-art companion scene for the **Ryoku** bar and desktop. A tiny
pet sits in the bar; click it to open a full scene with your companions, treat
them, bounce a ball with them, change the sky, or just give them head pats.
Right-click the bar glyph for a quick pat without opening the panel.

This is a native Ryoku plugin: it uses the shell's `Theme` tokens, the shared
panel surface, `pluginApi.saveSetting` for persistence, and the same two-host
dispatch (`topbarGlyph` + `desktopWidget`) used by Coffee and LeetCode Summary.
It is inspired by the Omarchy Navbar Pets idea, but the artwork, QML, and
simulation here are written from scratch — no upstream sprites or code are used.

## Features

- **Eight original species** — cat, dog, panda, fox, rat, frog, bird and dragon,
drawn as 16×16 pixel sprites with a two-frame walk cycle. Pick one species or
run the whole menagerie with `MIXED`.
- **Five scenic skies** — Dawn, Meadow, Dusk, Night and Candy, each a QML-painted
gradient with stars, layered ridges and a ground line. No image files.
- **Treats and chasing** — drop a treat and the matching pet runs toward it,
eats it, and shows a happy face and crumbs.
- **Physics play** — a bouncing ball with gravity and damped bounce; pets hop
when patted. `CALM` reduces motion and slows the simulation for quiet desks.
- **Live controls** — treat, ball on/off, pat all, cycle sky, play ball, change
species, companions (1–4) and sprite pixel size, all from the panel.
- **Two hosts, one state** — the bar glyph and the desktop tile read the same
service instance, so a treat given on the desktop is reflected in the bar.
- **Privacy by default** — no network hosts, no external commands, no file
writes, no compositor socket access. Only settings are persisted, through
the host API.

## Files

| file | role |
| --- | --- |
| `service/Main.qml` | headless simulation: pets, ball, treats, particles, settings |
| `content/Pets.js` | original sprite rect definitions and scenery palettes |
| `content/PetSprite.qml` | Canvas renderer for one 16×16 pet |
| `content/Scene.qml` | reusable scenic background + actors |
| `content/Widget.qml` | host dispatcher: glyph on the bar, card on the desktop |
| `content/Glyph.qml` | bar mark, mood dot, click/right-click actions |
| `content/Card.qml` | desktop tile with scene and four quick actions |
| `content/Panel.qml` | full scene panel and all controls |

## Settings

| key | type | default | description |
| --- | --- | --- | --- |
| `pet` | choice | `mixed` | species, or `mixed` for one of each |
| `theme` | choice | `dawn` | scenic sky palette |
| `companions` | int | `2` | number of pets, 1–4 |
| `pixelScale` | int | `2` | sprite pixel size, 1–4 |
| `ball` | toggle | `true` | bouncing ball on startup |
| `reducedMotion` | toggle | `false` | calm mode (slower, less motion) |

Settings can be changed in the panel or under **Ryoku Settings > Add-ons >
Navbar Pets**.

## Preview

Desktop tile:

![Navbar Pets desktop tile](assets/preview-widget.png)

Bar panel:

![Navbar Pets panel](assets/preview-panel.png)

## Build, check, install

```
ryoku plugin validate .
ryoku plugin add . --bar --yes
```

Then enable the desktop tile under **Ryoku Settings > Add-ons** if you want the
second host. Because this is a QML-only plugin, a shell reload is enough after
changes: `ryoku reload`.

## Author

Manish <159711477+mannish01@users.noreply.github.com>: community-made
(`official` is false). Art and code original; MIT licensed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions plugins/ryoku-navbar-pets/content/Card.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
pragma ComponentBehavior: Bound

import QtQuick
import Ryoku.PluginKit.Singletons

// Desktop host: the same scene and the four playful actions, in a small tile.
Item {
id: root

property var pluginApi
property var screen
property bool active: false
property string density: "compact"
property real s: 1
property real widthBudget: 320
property bool open: false
property real reveal: 0
property bool tabActive: false
signal requestClose()

readonly property var service: pluginApi ? pluginApi.mainInstance : null

onActiveChanged: if (root.service) root.service.setHostActive("desktop", root.active)
Component.onCompleted: if (root.service) root.service.setHostActive("desktop", root.active)

implicitWidth: 320 * root.s
implicitHeight: 224 * root.s

MouseArea {
id: hover
anchors.fill: parent
hoverEnabled: true
}

Rectangle {
anchors.fill: parent
color: Theme.cardTop
border.color: hover.containsMouse ? Theme.accent : Theme.hair
border.width: 1
radius: Theme.radius
}

Row {
id: header
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 12 * root.s
spacing: 6 * root.s
Text {
anchors.verticalCenter: parent.verticalCenter
text: "NAVBAR PETS"
color: Theme.bright
font.family: Theme.display
font.pixelSize: 13 * root.s
font.bold: true
}
Text {
anchors.verticalCenter: parent.verticalCenter
text: root.service ? root.service.palette.name.toUpperCase() : ""
color: Theme.dim
font.family: Theme.mono
font.pixelSize: 9 * root.s
}
}

Rectangle {
anchors.top: header.bottom
anchors.topMargin: 8 * root.s
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 12 * root.s
anchors.rightMargin: 12 * root.s
height: 160 * root.s
radius: Theme.radius
clip: true
Scene {
anchors.fill: parent
s: root.s
service: root.service
onSceneClicked: if (root.service) root.service.petAll()
}
}

Row {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 12 * root.s
spacing: 6 * root.s
component TileButton: Rectangle {
id: btn
property string label: ""
implicitWidth: 62 * root.s
implicitHeight: 22 * root.s
radius: Theme.radius
color: buttonHit.containsMouse ? Qt.rgba(Theme.accent.r, Theme.accent.g, Theme.accent.b, 0.18) : "transparent"
border.color: Theme.border
border.width: 1
Text {
anchors.centerIn: parent
text: btn.label
color: buttonHit.containsMouse ? Theme.accent : Theme.dim
font.family: Theme.mono
font.pixelSize: 9 * root.s
}
MouseArea {
id: buttonHit
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: root.service && root.service[btn.label === "TREAT" ? "giveTreat" : btn.label === "BALL" ? "toggleBall" : btn.label === "PAT" ? "petAll" : "cycleTheme"]()
}
}
TileButton { label: "TREAT" }
TileButton { label: "BALL" }
TileButton { label: "PAT" }
TileButton { label: "SKY" }
}
}
72 changes: 72 additions & 0 deletions plugins/ryoku-navbar-pets/content/Glyph.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
pragma ComponentBehavior: Bound

import QtQuick
import QtQuick.Controls
import Ryoku.PluginKit.Singletons

// Bar host view: a tiny pixel pet that follows the chosen species and mood.
// Clicking toggles the scene panel; right-clicking sends a quick head pat.
Item {
id: root

property var pluginApi
property var screen
property bool active: false
property string density: "glyph"
property real s: 1
property real widthBudget: 220
property bool open: false
property real reveal: 0
property bool tabActive: false
signal requestClose()

readonly property var service: pluginApi ? pluginApi.mainInstance : null
readonly property string petId: service && service.pets.length
? service.pets[0].id : (service ? service.pet : "cat")
readonly property string mood: service && service.pets.length ? service.pets[0].mood : "calm"

onActiveChanged: if (root.service) root.service.setHostActive("bar", root.active)
Component.onCompleted: if (root.service) root.service.setHostActive("bar", root.active)

implicitWidth: Math.max(22 * root.s, sprite.implicitWidth + 10 * root.s)
implicitHeight: Math.max(20 * root.s, sprite.implicitHeight)

PetSprite {
id: sprite
anchors.verticalCenter: parent.verticalCenter
pet: root.petId === "mixed" ? "cat" : root.petId
phase: 0
mood: root.mood
pixelScale: 1 * root.s
}

Rectangle {
anchors.right: parent.right
anchors.top: parent.top
width: 5 * root.s
height: 5 * root.s
radius: 2.5 * root.s
color: root.mood === "happy" ? "#ff8fa3" : Theme.accent
visible: !!service
}

MouseArea {
id: hit
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton
onClicked: function (mouse) {
if (mouse.button === Qt.RightButton) {
if (root.service) root.service.petAll();
return;
}
if (!root.pluginApi) return;
if (root.open) root.requestClose();
else if (root.pluginApi.togglePanel) root.pluginApi.togglePanel();
}
ToolTip.visible: hit.containsMouse
ToolTip.text: "Navbar Pets · click for the scene, right-click to pet"
ToolTip.delay: 450
ToolTip.timeout: 3000
}
}
Loading