feat: screenshot script
parent
0a938c80d4
commit
be4d78b4f6
|
@ -27,6 +27,7 @@
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
wtype
|
wtype
|
||||||
xdg-utils
|
xdg-utils
|
||||||
|
(pks.callPackage ./screenshot.nix { inherit config pkgs; })
|
||||||
];
|
];
|
||||||
|
|
||||||
programs. zsh. loginExtra = ''
|
programs. zsh. loginExtra = ''
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
shell = "${pkgs.dash}/bin/dash";
|
||||||
|
grim = "${pkgs.grim}/bin/grim";
|
||||||
|
slurp = "${pkgs.slurp}/bin/slurp";
|
||||||
|
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
|
||||||
|
in
|
||||||
|
pkgs.writeScriptBin "screenshot" ''
|
||||||
|
#!${shell}
|
||||||
|
${grim} -g "$(${slurp} -d)" - | ${wl-copy} -t image/png
|
||||||
|
''
|
Loading…
Reference in New Issue