1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-05 05:12:05 -04:00

niri: add window-rule management

- settings UI for creating, editing, deleting window ruels
- IPC to create a window rule for the currently focused toplevel

fixes #1292
This commit is contained in:
bbedward
2026-01-27 19:28:13 -05:00
parent 6557d66f94
commit 68159b5c41
21 changed files with 4576 additions and 5 deletions

View File

@@ -64,11 +64,18 @@ Popup {
return actions;
}
function executePluginAction(actionFunc) {
if (typeof actionFunc === "function") {
function executePluginAction(actionOrObj) {
var actionFunc = typeof actionOrObj === "function" ? actionOrObj : actionOrObj?.action;
var closeLauncher = typeof actionOrObj === "object" && actionOrObj?.closeLauncher;
if (typeof actionFunc === "function")
actionFunc();
if (closeLauncher) {
controller?.itemExecuted();
} else {
controller?.performSearch();
}
controller?.performSearch();
hide();
}
@@ -83,7 +90,7 @@ Popup {
type: "item",
icon: act.icon || "play_arrow",
text: act.text || act.name || "",
pluginAction: act.action
pluginAction: act
});
}
return items;