* fix(phone-connect): zh-Hans locale, switcher aliasMap, box padding - Rename zh_hans -> zh-Hans (plugin.toml value, en.json key) and add the missing translations/zh-Hans.json. The zh_hans tag does not match BCP 47, so the framework's materialize step dropped the Chinese translation file and t() returned raw dot keys in the UI. - Add missing aliasMap definition in switcher() so the multi-device panel no longer errors on aliasMap[id]. Fixes #176. - Replace ui.box({padding=...}) with ui.row({padding=...}); box does not support the padding prop, causing ui-tree warnings on open. Supersedes #190 (which covers only the aliasMap fix). * fix(phone-connect): volume quoting, config data loss, interval, dead settings, slider, UI issues 1. media_set_volume: shellQuote the <int32> variant arg (was unquoted, shell treated < as redirect; same fix as media_seek). 2. onConfigChanged: track last-applied custom_image/device_alias values so unrelated config edits (e.g. language switch) no longer wipe a device's image/alias. Seed trackers at init so reload is safe too. 3. state_update_interval=0: return 3600000ms + guard in update() to skip auto-refresh, matching the '0 disables' description. 4. Remove 4 dead settings (show_ongoing_media, show_device_placeholder, scan_subdirectories, max_recent_images) declared but never read, plus orphan recent_images translation keys. 5. Media slider: freeze value during drag via per-device dragState so the 1s service refresh doesn't yank the slider back. Also fixes onDragEnd seeking to a stale seekPos. 6. Minor: runCli reports cli_failed not no_backend; browse uses runAsync not runInTerminal; charging color priority over low-battery; device name falls back to d.name; fix comment mismatches. * chore: bump version to 0.1.1 * fix: use lowercase zh-hans translation key to pass CI validation CI rejects uppercase in translation keys (zh-Hans). The translation key and label_key are now lowercase zh-hans, while the file name stays zh-Hans.json (required by the framework's materialize step) and the select value stays zh-Hans (used to build the file path).
146 lines
4.6 KiB
TOML
146 lines
4.6 KiB
TOML
# Noctalia v5 plugin manifest for Phone Connect (KDE Connect backend only)
|
|
# Plugin system is beta; APIs may change before v5 stable.
|
|
#
|
|
# plugin_api = 16: targets the last released level of v5.0.0. We avoid 17/18
|
|
# (Unreleased) so the plugin loads on stable v5.0.0. None of our code relies on
|
|
# 17+ features: onExit is unused, onConfigChanged is a baseline service hook.
|
|
#
|
|
# Status: KDE Connect only. Valent backend is intentionally out of scope for
|
|
# now, but the service entry (service.luau) is written as a swappable backend
|
|
# owner that publishes state to UI entries, so Valent can replace its internals
|
|
# later without UI changes.
|
|
|
|
id = "icefish/phone-connect"
|
|
name = "Phone Connect"
|
|
version = "0.1.1"
|
|
plugin_api = 16
|
|
author = "icefish"
|
|
license = "MIT"
|
|
deprecated = false
|
|
icon = "devices"
|
|
description = "Control paired phones via KDE Connect — battery, ring, ping, share, clipboard, pairing."
|
|
tags = ["bar", "panel", "service", "media"]
|
|
dependencies = ["kdeconnect", "sshfs"]
|
|
|
|
# ── Plugin-level settings (shared across all entries) ───────────────────────
|
|
# Mirrors the persisted keys of the original DankKDEConnect plugin where they
|
|
# make sense as typed settings. Per-device maps (image/type/recent-images-path)
|
|
# stay in pluginDataDir() JSON because they are dynamic, not declarative.
|
|
|
|
[[setting]]
|
|
key = "state_update_interval"
|
|
type = "int"
|
|
label_key = "settings.state_update_interval.label"
|
|
description_key = "settings.state_update_interval.description"
|
|
default = 30
|
|
min = 0
|
|
max = 300
|
|
|
|
[[setting]]
|
|
key = "enable_charging_animation"
|
|
type = "bool"
|
|
label_key = "settings.enable_charging_animation.label"
|
|
description_key = "settings.enable_charging_animation.description"
|
|
default = true
|
|
|
|
[[setting]]
|
|
key = "custom_image"
|
|
type = "file"
|
|
label_key = "settings.custom_image.label"
|
|
description_key = "settings.custom_image.description"
|
|
default = ""
|
|
extensions = [".png", ".jpg", ".jpeg", ".webp", ".svg"]
|
|
|
|
[[setting]]
|
|
key = "device_alias"
|
|
type = "string"
|
|
label_key = "settings.device_alias.label"
|
|
description_key = "settings.device_alias.description"
|
|
default = "Your-Phone"
|
|
|
|
[[setting]]
|
|
key = "language"
|
|
type = "select"
|
|
label_key = "settings.language.label"
|
|
description_key = "settings.language.description"
|
|
default = "en"
|
|
options = [
|
|
{ value = "en", label_key = "settings.language.en" },
|
|
{ value = "zh-Hans", label_key = "settings.language.zh-hans" },
|
|
]
|
|
|
|
[[setting]]
|
|
key = "enable_clipboard_action"
|
|
type = "bool"
|
|
label_key = "settings.enable_clipboard_action.label"
|
|
description_key = "settings.enable_clipboard_action.description"
|
|
default = true
|
|
|
|
[[setting]]
|
|
key = "panel_placement"
|
|
type = "select"
|
|
label_key = "settings.panel_placement.label"
|
|
description_key = "settings.panel_placement.description"
|
|
default = "attached"
|
|
options = [
|
|
{ value = "attached", label_key = "settings.panel_placement.attached" },
|
|
{ value = "floating", label_key = "settings.panel_placement.floating" },
|
|
{ value = "widget", label_key = "settings.panel_placement.widget" },
|
|
]
|
|
|
|
# ── Entries ─────────────────────────────────────────────────────────────────
|
|
# Four entries: a background service that talks DBus, a bar widget, a control
|
|
# center tile, and a panel for the detailed device view.
|
|
|
|
[[service]]
|
|
id = "kde"
|
|
entry = "service.luau"
|
|
|
|
[[widget]]
|
|
id = "bar"
|
|
entry = "widget.luau"
|
|
|
|
# Right-click opens settings via onRightClick in the script
|
|
# (noctalia.openSettings). Left-click toggles the details panel. We deliberately
|
|
# do not bind [widget.actions] here: the panel-toggle action grammar for opening
|
|
# a *plugin* panel by id is not documented, so we drive it from the script instead.
|
|
|
|
[[shortcut]]
|
|
id = "tile"
|
|
entry = "tile.luau"
|
|
|
|
[[panel]]
|
|
id = "details"
|
|
entry = "panel.luau"
|
|
width = 500
|
|
height = 600
|
|
placement = "attached"
|
|
position = "auto"
|
|
open_near_click = true
|
|
keyboard_focus = "on_demand"
|
|
|
|
# Floating variant: same script, opens detached (screen center). The widget/tile
|
|
# pick which panel id to toggle based on the "panel_placement" setting, so users
|
|
# choose attached vs floating without a runtime setPlacement API.
|
|
[[panel]]
|
|
id = "details_floating"
|
|
entry = "panel.luau"
|
|
width = 500
|
|
height = 600
|
|
placement = "floating"
|
|
position = "center"
|
|
keyboard_focus = "on_demand"
|
|
|
|
# Floating-near-widget variant: floating surface that opens near the toggling
|
|
# bar widget (open_near_click), i.e. suspended just below the widget rather than
|
|
# anchored to the bar edge (attached) or screen-centered (floating).
|
|
[[panel]]
|
|
id = "details_widget"
|
|
entry = "panel.luau"
|
|
width = 500
|
|
height = 600
|
|
placement = "floating"
|
|
position = "auto"
|
|
open_near_click = true
|
|
keyboard_focus = "on_demand"
|