My NixOS config Part 3: Flake-Parts Crusaders
nix.ladas552.me
hjem
nix
nixos
impermanence
flake-parts
nvfetcher
niri
noctalia
1{
2 # It is a one liner to replace xpick on Wayland. Compatible with Wlroots. Doesn't need dependencies outside of ImageMagick that already declared in host
3
4 perSystem =
5 { pkgs, lib, ... }:
6 {
7 packages.wpick =
8 pkgs.writeShellScriptBin "wpick" # bash
9 ''
10 ${lib.meta.getExe' pkgs.grim "grim"} -g "$(${lib.meta.getExe' pkgs.slurp "slurp"} -p)" -t ppm - | ${lib.meta.getExe' pkgs.imagemagick "magick"} - -format '%[pixel:p{0,0}]' txt:-
11 '';
12 };
13}