summaryrefslogtreecommitdiff
path: root/modules/areapicker/Picker.qml
diff options
context:
space:
mode:
Diffstat (limited to 'modules/areapicker/Picker.qml')
-rw-r--r--modules/areapicker/Picker.qml9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/areapicker/Picker.qml b/modules/areapicker/Picker.qml
index 1625ccf..67ec268 100644
--- a/modules/areapicker/Picker.qml
+++ b/modules/areapicker/Picker.qml
@@ -73,7 +73,14 @@ MouseArea {
function save(): void {
const tmpfile = Qt.resolvedUrl(`/tmp/caelestia-picker-${Quickshell.processId}-${Date.now()}.png`);
- CUtils.saveItem(screencopy, tmpfile, Qt.rect(Math.ceil(rsx), Math.ceil(rsy), Math.floor(sw), Math.floor(sh)), path => Quickshell.execDetached(["swappy", "-f", path]));
+ CUtils.saveItem(screencopy, tmpfile, Qt.rect(Math.ceil(rsx), Math.ceil(rsy), Math.floor(sw), Math.floor(sh)), path => {
+ if (root.loader.clipboardOnly) {
+ Quickshell.execDetached(["sh", "-c", "wl-copy --type image/png < " + path]);
+ Quickshell.execDetached(["notify-send", "-a", "caelestia-cli", "-i", path, "Screenshot taken", "Screenshot copied to clipboard"]);
+ } else {
+ Quickshell.execDetached(["swappy", "-f", path]);
+ }
+ });
closeAnim.start();
}