1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

niri: support any screenshot editor tool

This commit is contained in:
bbedward
2026-02-04 11:05:52 -05:00
parent fa71d563ea
commit bd9029e533

View File

@@ -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
});