diff --git a/legacy_modules/desktop/screenshot.nix b/legacy_modules/desktop/screenshot.nix new file mode 100644 index 0000000..b4f9cbf --- /dev/null +++ b/legacy_modules/desktop/screenshot.nix @@ -0,0 +1,11 @@ +{pkgs, lib, ...}: let + screenshotPkg = pkgs.writeShellScriptBin "screenshot" '' + AREA=$(${lib.getExe pkgs.slurp} -d) + ${lib.getExe pkgs.grim} -t ppm -g "$AREA" - | ${lib.getExe pkgs.satty} -f - --initial-tool=arrow --copy-command=${pkgs.wl-clipboard}/bin/wl-copy --action-on-enter="save-to-clipboard" --disable-notifications + ''; + +in { + environment.systemPackages = [ + screenshotPkg + ]; +} \ No newline at end of file diff --git a/legacy_modules/graphical.nix b/legacy_modules/graphical.nix index 2581238..1295171 100644 --- a/legacy_modules/graphical.nix +++ b/legacy_modules/graphical.nix @@ -11,6 +11,7 @@ ./desktop/hyprland/default.nix ./desktop/gtk/default.nix ./desktop/qt.nix + ./desktop/screenshot.nix ./apps/spotify.nix ./apps/firefox.nix ./apps/chromium.nix