mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-14 09:42:10 -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:
@@ -14,12 +14,22 @@ Singleton {
|
||||
readonly property string outputsPath: hyprDmsDir + "/outputs.conf"
|
||||
readonly property string layoutPath: hyprDmsDir + "/layout.conf"
|
||||
readonly property string cursorPath: hyprDmsDir + "/cursor.conf"
|
||||
readonly property string windowrulesPath: hyprDmsDir + "/windowrules.conf"
|
||||
|
||||
property int _lastGapValue: -1
|
||||
|
||||
Component.onCompleted: {
|
||||
if (CompositorService.isHyprland)
|
||||
if (CompositorService.isHyprland) {
|
||||
Qt.callLater(generateLayoutConfig);
|
||||
ensureWindowrulesConfig();
|
||||
}
|
||||
}
|
||||
|
||||
function ensureWindowrulesConfig() {
|
||||
Proc.runCommand("hypr-ensure-windowrules", ["sh", "-c", `mkdir -p "${hyprDmsDir}" && [ ! -f "${windowrulesPath}" ] && touch "${windowrulesPath}" || true`], (output, exitCode) => {
|
||||
if (exitCode !== 0)
|
||||
console.warn("HyprlandService: Failed to ensure windowrules.conf:", output);
|
||||
});
|
||||
}
|
||||
|
||||
Connections {
|
||||
|
||||
Reference in New Issue
Block a user