From 6f9ce8e31819de7f556193ad4eb6fa2dacd4c10d Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Mon, 14 Nov 2022 20:57:30 +0100 Subject: [PATCH] Use wayshot, it's fine but doesn't support multiple monitors --- home/modules/programs/my-sway/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/home/modules/programs/my-sway/default.nix b/home/modules/programs/my-sway/default.nix index ef20587..d5eecfb 100644 --- a/home/modules/programs/my-sway/default.nix +++ b/home/modules/programs/my-sway/default.nix @@ -29,10 +29,18 @@ let in f from; + wayshot = pkgs.unstable.wayshot.overrideAttrs (attrs: { + src = pkgs.fetchFromGitHub { + owner = "waycrate"; + repo = "wayshot"; + rev = "27cf882ed0a90e657c66b73a44cf2327c322864b"; + sha256 = "sha256-sWF5dV22lJfZooFb8p8+hhXqJ2DazVZYFu4k4XFPtu8="; + }; + }); screenshotScript = pkgs.writeScriptBin "screenshot" '' #! ${pkgs.fish}/bin/fish - ${pkgs.grim}/bin/grim -g (${pkgs.slurp}/bin/slurp) - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png + ${wayshot}/bin/wayshot -s (${pkgs.slurp}/bin/slurp -f '%x %y %w %h') --stdout | ${pkgs.wl-clipboard}/bin/wl-copy ''; ignored-devices = [ "Surface_Headphones" ];