Dotfiles/qutebrowser/.local/share/qutebrowser/userscripts/iconProject
Jonathan Hodgson 90fc6ab4fb Many changes
2019-10-10 17:29:09 +01:00

10 lines
576 B
Bash
Executable file

#!/usr/bin/env bash
# This is a qutebrowser user script that is intendet to be run from an icon project page
# It will put a vector version of the image on the clipboard, ready to be pasted into something like inkscape
cat "$QUTE_HTML" | # This is the qutebrowser file repersenting the current page's html
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