scripts: extract color_picker from sway

This commit is contained in:
Leonardo Eugênio 2023-02-25 17:03:00 -03:00
parent 313a8e168a
commit caa4495215
3 changed files with 13 additions and 9 deletions

10
scripts/color_picker Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
set -xe
grim -g "$(slurp -b aabbcc00 -p)" - |
convert - txt:- |
grep -oE '#[0-9A-Fa-f]{6}' |
wl-copy -n
notify-send "$(wl-paste)" "Copied to clipboard"

View file

@ -40,6 +40,7 @@ create_scripts
[ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
volumesh = [ pulseaudio libnotify ];
pulse_sink = [ pulseaudio pamixer final.wdmenu ];
color_picker = [ grim slurp wl-clipboard libnotify imagemagick ];
} // lib.mapAttrs import_script {
wdmenu = ./wdmenu.nix;
wlauncher = ./wlauncher.nix;