Dotfiles/bin/.bin/iconProject
2020-01-31 14:52:49 +00:00

9 lines
373 B
Bash
Executable file

#!/usr/bin/env bash
node /home/jonathan/GitRepos/chrome-curl/index.js "$1" |\
#hq '.iconPreview' data
hq '.iconPreview' attr style | # This gets the style attribute from the preview element
cut -d '"' -f 2 | cut -d ',' -f 2 | # Gets the base 64 out that we want
base64 -d | # Decodes it
xclip -selection clipboard -target image/svg+xml -i # Puts it on the clipboard