Show Omarchy plugin settings on the Plugins page
Omarchy plugins with a manifest schema get a Settings button like Noctalia ones: a full form (label, description, control) that edits the same bar.modules options as the bar cog and applies as you go. A plugin not in the bar keeps its options on a switched-off entry, which Add to bar turns on. `plugins settings <id>` over IPC opens it, scrolled into view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
660fa69be6
commit
3f0e31b116
3 files changed
+198
-7
No files matched your search
@@ -125,8 +125,12 @@ Singleton {
|
||||
if (!p || !isEnabled(id))
|
||||
return false;
|
||||
const moduleId = "plugin:" + id;
|
||||
if (ConfigService.data.bar.modules.some(m => m.id === moduleId))
|
||||
return false;
|
||||
const existing = ConfigService.data.bar.modules.find(m => m.id === moduleId);
|
||||
// A switched-off entry may hold options set on the Plugins page: turn it on.
|
||||
if (existing)
|
||||
return existing.enabled === false
|
||||
? ConfigService.setValue("bar.modules", ConfigService.data.bar.modules.map(m => m.id === moduleId ? Object.assign({}, m, {enabled: true}) : m))
|
||||
: false;
|
||||
const section = (p.manifest.barWidget || {}).defaultSection;
|
||||
return ConfigService.setValue("bar.modules", ConfigService.data.bar.modules.concat([
|
||||
{
|
||||
@@ -452,6 +456,12 @@ Singleton {
|
||||
function toggle(id: string, payload: string): bool {
|
||||
return root.toggle(id, payload);
|
||||
}
|
||||
// Settings → Plugins with this plugin's settings open.
|
||||
function settings(id: string): void {
|
||||
root.focusedSettings = "";
|
||||
root.focusedSettings = id;
|
||||
ShellState.openSettings("plugins");
|
||||
}
|
||||
// Marketplace search, as in the Browse tab.
|
||||
function browse(query: string): void {
|
||||
root.marketQuery = query;
|
||||
|
||||
Reference in new issue
Block a user