mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
feat: add screenshot script
This commit is contained in:
parent
f905444ccf
commit
94194bf902
2 changed files with 12 additions and 0 deletions
11
legacy_modules/desktop/screenshot.nix
Normal file
11
legacy_modules/desktop/screenshot.nix
Normal file
|
|
@ -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
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
./desktop/hyprland/default.nix
|
./desktop/hyprland/default.nix
|
||||||
./desktop/gtk/default.nix
|
./desktop/gtk/default.nix
|
||||||
./desktop/qt.nix
|
./desktop/qt.nix
|
||||||
|
./desktop/screenshot.nix
|
||||||
./apps/spotify.nix
|
./apps/spotify.nix
|
||||||
./apps/firefox.nix
|
./apps/firefox.nix
|
||||||
./apps/chromium.nix
|
./apps/chromium.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue