Sway organisation

This commit is contained in:
Charlotte Van Petegem 2020-02-21 15:06:02 +01:00
parent f23200c460
commit ec5adf3828
4 changed files with 211 additions and 187 deletions

View file

@ -0,0 +1,9 @@
{ pkgs }:
pkgs.writeScriptBin "color_picker" ''
#!${pkgs.zsh}/bin/zsh
color=$(${pkgs.grim}/bin/grim -t png -g "$(${pkgs.slurp}/bin/slurp -p)" - | ${pkgs.imagemagick}/bin/convert png:- -unique-colors txt:- | grep -o '#[A-F0-9]\+')
${pkgs.sway}/bin/swaymsg exec -- "echo -n '$color' | ${pkgs.wl-clipboard}/bin/wl-copy --foreground"
''