diff --git a/topgrade-wrapper/README.md b/topgrade-wrapper/README.md index e1d87ab..ea14abf 100644 --- a/topgrade-wrapper/README.md +++ b/topgrade-wrapper/README.md @@ -15,8 +15,9 @@ count at a glance without giving up the interactive upgrade. ## Requirements -Noctalia with plugin API 9 or newer (the panel wires its callbacks as closures), -and `topgrade` on `PATH`. A terminal emulator is needed for the update run: +Noctalia v5.0.0-beta.6 or newer — the first tagged release that accepts +`plugin_api = 15`, which the panel's settings shortcut +(`noctalia.openSettings()`) needs — and `topgrade` on `PATH`. A terminal emulator is needed for the update run: the plugin uses Noctalia's own detection (`$TERMINAL`, then `ghostty`, `kitty`, `alacritty`, `wezterm`, `foot`, `konsole`, `gnome-terminal`, `ptyxis`, `xterm`), or the one named in the **Terminal** setting. @@ -67,6 +68,14 @@ noctalia msg panel-toggle nightwatch75/topgrade-wrapper:panel | **Update** (panel) | Run topgrade in a terminal window | | **Dismiss** (panel) | Keep the numbers but return the bar glyph to its resting colour | | ↻ refresh (panel header) | Same as **Check Updates** | +| ⚙ settings (panel header) | Open this plugin's page in *Settings → Plugins* | + +That settings page also opens from the command line, so it can be bound in your +compositor too: + +```sh +noctalia msg settings-open-plugin nightwatch75/topgrade-wrapper +``` The glyph turns to the accent colour with the pending count next to it once a check finds something, stays neutral while everything is up to date or after diff --git a/topgrade-wrapper/panel.luau b/topgrade-wrapper/panel.luau index 52d6afa..4955e9c 100644 --- a/topgrade-wrapper/panel.luau +++ b/topgrade-wrapper/panel.luau @@ -349,6 +349,17 @@ render = function() request("check") end, }), + -- Opens the settings window on this plugin's own page (the host + -- supplies the plugin id, so a plugin can only ever open its own). + -- The panel closes on the way; the engine keeps running. + ui.button({ + glyph = "settings", + variant = "ghost", + tooltip = tr("tip_settings"), + onClick = function() + noctalia.openSettings() + end, + }), ui.button({ glyph = "close", variant = "ghost", diff --git a/topgrade-wrapper/plugin.toml b/topgrade-wrapper/plugin.toml index 0401416..8593081 100644 --- a/topgrade-wrapper/plugin.toml +++ b/topgrade-wrapper/plugin.toml @@ -11,8 +11,8 @@ id = "nightwatch75/topgrade-wrapper" name = "Topgrade Wrapper" -version = "0.0.2" -plugin_api = 9 +version = "0.0.4" +plugin_api = 15 author = "nightwatch75" license = "MIT" dependencies = ["topgrade"] diff --git a/topgrade-wrapper/translations/en.json b/topgrade-wrapper/translations/en.json index a8d649a..7e0c50f 100644 --- a/topgrade-wrapper/translations/en.json +++ b/topgrade-wrapper/translations/en.json @@ -103,6 +103,7 @@ "step_planning": "topgrade steps", "step_unnamed": "topgrade", "tip_check": "Check for updates now", + "tip_settings": "Plugin settings", "tip_close": "Close", "tip_update": "Run topgrade in a terminal window", "title": "Topgrade Wrapper",