Sway organisation
This commit is contained in:
parent
f23200c460
commit
ec5adf3828
4 changed files with 211 additions and 187 deletions
9
programs/sway/color-picker.nix
Normal file
9
programs/sway/color-picker.nix
Normal 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"
|
||||
''
|
Loading…
Add table
Add a link
Reference in a new issue