From bd9029e533d6adc566fd42c49504feb63d0a6d0a Mon Sep 17 00:00:00 2001 From: bbedward Date: Wed, 4 Feb 2026 11:05:52 -0500 Subject: [PATCH] niri: support any screenshot editor tool --- quickshell/Services/NiriService.qml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/quickshell/Services/NiriService.qml b/quickshell/Services/NiriService.qml index 93a5354c..53ebad8e 100644 --- a/quickshell/Services/NiriService.qml +++ b/quickshell/Services/NiriService.qml @@ -668,7 +668,15 @@ Singleton { return; if (pendingScreenshotPath && data.path === pendingScreenshotPath) { const editor = Quickshell.env("DMS_SCREENSHOT_EDITOR"); - const command = editor === "satty" ? ["satty", "-f", data.path] : ["swappy", "-f", data.path]; + let command; + if (editor === "satty") { + command = ["satty", "-f", data.path]; + } else if (editor === "swappy" || !editor) { + command = ["swappy", "-f", data.path]; + } else { + // Custom command with %path% placeholder + command = editor.split(" ").map(arg => arg === "%path%" ? data.path : arg); + } Quickshell.execDetached({ "command": command });