diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-01-19 19:28:02 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-01-19 19:28:02 +0300 |
commit | 64d645f2bd1d18aeefdde07621a1a4d1e07cb1cd (patch) | |
tree | ea510151b7de91fc77b9889cc12689cca5363956 | |
parent | 7b08142d1e413eeb72d0215c89f744f7af107b50 (diff) | |
download | swayrice-64d645f2bd1d18aeefdde07621a1a4d1e07cb1cd.tar.gz swayrice-64d645f2bd1d18aeefdde07621a1a4d1e07cb1cd.zip |
Script to pick colors from screen
Taken from
https://git.sr.ht/~sircmpwn/dotfiles/tree/master/item/bin/colorpick and
slightly modified.
-rwxr-xr-x | dotfiles/.local/bin/colorpick | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dotfiles/.local/bin/colorpick b/dotfiles/.local/bin/colorpick new file mode 100755 index 0000000..efb67cc --- /dev/null +++ b/dotfiles/.local/bin/colorpick @@ -0,0 +1,6 @@ +#!/bin/sh +# Taken and slightly modified from Drew DeVault's dotfiles + +color=$(grim -g "$(slurp -p -b 00000000)" - | convert - txt:- | awk 'END{print $3}') +wl-copy "$color" +notify-send "🎨 Color copied to clipboard" "<span color=\"$color\">$color</span>" |