From 9eaa9df370ae1ebcc5990f687c96549906bcf9d5 Mon Sep 17 00:00:00 2001 From: Yocraft-2000 <304616174+Yocraft-2000@users.noreply.github.com> Date: Fri, 21 Aug 2026 11:48:21 +0200 Subject: [PATCH 1/2] feat: add control center tile --- qrcode/README.md | 4 ++-- qrcode/plugin.toml | 6 +++++- qrcode/shortcut.luau | 10 ++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 qrcode/shortcut.luau diff --git a/qrcode/README.md b/qrcode/README.md index 3e4d7c39..79e5be7f 100644 --- a/qrcode/README.md +++ b/qrcode/README.md @@ -7,7 +7,7 @@ Transform any text or URL into a QR code completely offline. Then scan or copy t | Field | Value | | --- | --- | | ID | `yocraft/qrcode` | -| Entries | Bar widget: `widget`; panel: `panel` | +| Entries | Bar widget: `widget`; panel: `panel`; shortcut: `shortcut` | ## Requirements @@ -15,7 +15,7 @@ Install `qrencode` on `PATH`. ## Usage -Open the panel from the bar widget or with this command: +Open the panel from the `QR Code Encoder` bar widget, the control center tile, or with this command: ```sh noctalia msg panel-toggle yocraft/qrcode:panel ``` diff --git a/qrcode/plugin.toml b/qrcode/plugin.toml index 20df948d..260d1d76 100644 --- a/qrcode/plugin.toml +++ b/qrcode/plugin.toml @@ -1,6 +1,6 @@ id = "yocraft/qrcode" name = "QR Code Encoder" -version = "1.0.1" +version = "1.1.0" plugin_api = 15 author = "yocraft" license = "MIT" @@ -32,6 +32,10 @@ entry = "widget.luau" default = "" extensions = [".png", ".jpg", ".jpeg", ".webp", ".svg"] +[[shortcut]] +id = "shortcut" +entry = "shortcut.luau" + [[panel]] id = "panel" entry = "panel.luau" diff --git a/qrcode/shortcut.luau b/qrcode/shortcut.luau new file mode 100644 index 00000000..1207c372 --- /dev/null +++ b/qrcode/shortcut.luau @@ -0,0 +1,10 @@ +local function render() + shortcut.setLabel("QR Code") + shortcut.setIcon("qrcode") +end + +render() + +function onClick() + noctalia.togglePanel("yocraft/qrcode:panel") +end From fc9f9d4c94e5a69339c55b29e943e6ae861eb387 Mon Sep 17 00:00:00 2001 From: Yocraft-2000 <304616174+Yocraft-2000@users.noreply.github.com> Date: Sat, 22 Aug 2026 04:09:29 +0200 Subject: [PATCH 2/2] feat: image corner roundness consistent with noctalia setting --- qrcode/panel.luau | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qrcode/panel.luau b/qrcode/panel.luau index ffb12627..ae3ea81d 100644 --- a/qrcode/panel.luau +++ b/qrcode/panel.luau @@ -9,6 +9,7 @@ local imageSize = 400 local generateButton = noctalia.getConfig("generate_button") local keepOnClose = noctalia.getConfig("keep_on_close") local notifyConf = noctalia.getConfig("notify") +local corner_radius_scale = 1.0 -- when toggling off keep_on_close, the image will not be deleted, so this runs every config change if not keepOnClose then @@ -88,7 +89,7 @@ local function render() path = imagePath, width = imageSize, height = imageSize, - radius = 24, + radius = 24 * corner_radius_scale, onClick = "onImageClick", }) }) @@ -187,9 +188,13 @@ local function generate(text) end function onOpen(_context) + -- here because it needs to be reloaded when the setting is changed + corner_radius_scale = noctalia.getSetting("shell.corner_radius_scale") or 1.0 + if not keepOnClose then status = "idle" end + render() end