diff --git a/package.nix b/package.nix index 656d313..cc0236d 100644 --- a/package.nix +++ b/package.nix @@ -6,7 +6,6 @@ nushell, curl, grim, - wl-clipboard, }: stdenvNoCC.mkDerivation { @@ -35,7 +34,7 @@ stdenvNoCC.mkDerivation { mkdir -p $out/bin makeWrapper ${lib.getExe nushell} $out/bin/skygqts \ --add-flags "$out/share/skygqts/skygqts.nu" \ - --prefix PATH : ${lib.makeBinPath [ quickshell curl grim wl-clipboard ]} + --prefix PATH : ${lib.makeBinPath [ quickshell curl grim ]} runHook postInstall ''; diff --git a/workspace-manager/Compositor.qml b/workspace-manager/Compositor.qml index 2d13ef4..1cad2c4 100644 --- a/workspace-manager/Compositor.qml +++ b/workspace-manager/Compositor.qml @@ -416,10 +416,7 @@ Item { } const path = root.previewPath(key); if (root.kind === "niri") { - // niri only shows its "Screenshot captured" notice when it saves a - // file, so skip the file and copy the image from the clipboard. - // The id and path are passed as $1 and $2, not pasted into the script. - shotProc.command = ["sh", "-c", "niri msg action screenshot-window --id \"$1\" --write-to-disk false && wl-paste --type image/png > \"$2\"", "sh", w.captureId, path]; + shotProc.command = ["niri", "msg", "action", "screenshot-window", "--id", w.captureId, "--write-to-disk", "true", "--path", path]; } else { shotProc.command = ["grim", "-T", w.captureId, path]; } diff --git a/workspace-manager/Theme.qml b/workspace-manager/Theme.qml index b8aa75a..3d72313 100644 --- a/workspace-manager/Theme.qml +++ b/workspace-manager/Theme.qml @@ -67,7 +67,7 @@ QtObject { readonly property bool livePreviews: true // Still snapshots taken when the loop opens. On Hyprland they back up the // live previews and use grim. On niri they use niri's own screenshot, - // which also replaces the clipboard, and need wl-paste. + // which always shows a notification and replaces the clipboard. readonly property bool snapshotPreviewsHyprland: true readonly property bool snapshotPreviewsNiri: true