From 578cd3666edd5315c1e9356c40be6b43635e26ce Mon Sep 17 00:00:00 2001 From: tsukasa <62455208+tsxkasa@users.noreply.github.com> Date: Mon, 1 Dec 2025 03:52:44 -0800 Subject: picker: copy screenshot to clipboard (#940) added screenshotClip and screenshotFreezeClip to allow directly copying screenshots to clipboard instead of opening it in swappy --- modules/areapicker/AreaPicker.qml | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'modules/areapicker/AreaPicker.qml') diff --git a/modules/areapicker/AreaPicker.qml b/modules/areapicker/AreaPicker.qml index 7ff051f..0d8b2fe 100644 --- a/modules/areapicker/AreaPicker.qml +++ b/modules/areapicker/AreaPicker.qml @@ -12,6 +12,7 @@ Scope { property bool freeze property bool closing + property bool clipboardOnly Variants { model: Quickshell.screens @@ -51,12 +52,28 @@ Scope { function open(): void { root.freeze = false; root.closing = false; + root.clipboardOnly = false; root.activeAsync = true; } function openFreeze(): void { root.freeze = true; root.closing = false; + root.clipboardOnly = false; + root.activeAsync = true; + } + + function openClip(): void { + root.freeze = false; + root.closing = false; + root.clipboardOnly = true; + root.activeAsync = true; + } + + function openFreezeClip(): void { + root.freeze = true; + root.closing = false; + root.clipboardOnly = true; root.activeAsync = true; } } @@ -67,6 +84,7 @@ Scope { onPressed: { root.freeze = false; root.closing = false; + root.clipboardOnly = false; root.activeAsync = true; } } @@ -77,6 +95,29 @@ Scope { onPressed: { root.freeze = true; root.closing = false; + root.clipboardOnly = false; + root.activeAsync = true; + } + } + + CustomShortcut { + name: "screenshotClip" + description: "Open screenshot tool (clipboard)" + onPressed: { + root.freeze = false; + root.closing = false; + root.clipboardOnly = true; + root.activeAsync = true; + } + } + + CustomShortcut { + name: "screenshotFreezeClip" + description: "Open screenshot tool (freeze mode, clipboard)" + onPressed: { + root.freeze = true; + root.closing = false; + root.clipboardOnly = true; root.activeAsync = true; } } -- cgit v1.2.3-freya