Last active
October 5, 2021 03:38
-
-
Save lokesh-krishna/266199f25ff68b1ea07817223ae662e5 to your computer and use it in GitHub Desktop.
rang.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
grim -g "$(slurp -p)" - > /tmp/pixel.png | |
magick /tmp/pixel.png -colors 1 txt: | tail -n 1 | awk '{print $3}' > /tmp/hex | |
magick convert /tmp/pixel.png -filter point -resize 96x96 -bordercolor '#303030' -border 5 /tmp/big-pixel.png | |
notify-send -i /tmp/big-pixel.png " rang" "The hex code is $(cat /tmp/hex)" | |
cat /tmp/hex | wl-copy -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment