refactor: desktop legacy module

This commit is contained in:
Nickolaj Jepsen 2025-12-12 04:02:55 +01:00
parent 5f56c011ab
commit d463f4d1af
31 changed files with 630 additions and 577 deletions

View file

@ -0,0 +1,17 @@
{
config,
lib,
pkgs,
...
}: 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 --early-exit --copy-command=${pkgs.wl-clipboard}/bin/wl-copy --action-on-enter="save-to-clipboard" --disable-notifications
'';
in {
config = lib.mkIf config.fireproof.desktop.enable {
environment.systemPackages = [
screenshotPkg
];
};
}