From 0cc521aef558ff409155bd6c4faa8a4423862e2b Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 9 Dec 2025 23:27:23 +0100 Subject: [PATCH] option for satty instead of swappy (#2585) --- dots/.config/quickshell/ii/modules/common/Config.qml | 3 +++ .../ii/modules/ii/regionSelector/RegionSelection.qml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index 859e336e3..ac4dfc96b 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -437,6 +437,9 @@ Singleton { property int strokeWidth: 6 property int padding: 10 } + property JsonObject annotation: JsonObject { + property bool useSatty: false + } } property JsonObject resources: JsonObject { diff --git a/dots/.config/quickshell/ii/modules/ii/regionSelector/RegionSelection.qml b/dots/.config/quickshell/ii/modules/ii/regionSelector/RegionSelection.qml index 8f484591b..59dc186e7 100644 --- a/dots/.config/quickshell/ii/modules/ii/regionSelector/RegionSelection.qml +++ b/dots/.config/quickshell/ii/modules/ii/regionSelector/RegionSelection.qml @@ -261,6 +261,7 @@ PanelWindow { const uploadAndGetUrl = (filePath) => { return `curl -sF files[]=@'${StringUtils.shellSingleQuoteEscape(filePath)}' ${root.fileUploadApiEndpoint} | jq -r '.files[0].url'` } + const annotationCommand = `${Config.options.regionSelector.annotation.useSatty ? "satty" : "swappy"} -f -`; switch (root.action) { case RegionSelection.SnipAction.Copy: if (saveScreenshotDir === "") { @@ -282,7 +283,7 @@ PanelWindow { break; case RegionSelection.SnipAction.Edit: - snipProc.command = ["bash", "-c", `${cropToStdout} | swappy -f - && ${cleanup}`] + snipProc.command = ["bash", "-c", `${cropToStdout} | ${annotationCommand} && ${cleanup}`] break; case RegionSelection.SnipAction.Search: snipProc.command = ["bash", "-c", `${cropInPlace} && xdg-open "${root.imageSearchEngineBaseUrl}$(${uploadAndGetUrl(root.screenshotPath)})" && ${cleanup}`]