stuff/stuff.sh

12 lines
355 B
Bash
Raw Normal View History

2021-05-03 21:31:20 +00:00
#!/bin/sh
[ $# -eq 0 ] && exit 1
STUFF_FILE=/usr/share/stuff/stuff.png
FILE=/tmp/$(date "+%Y-%m-%d-%H-%M-%S").png
2021-05-03 22:29:47 +00:00
LABEL_FILE=$FILE.label.png
text=$@
2021-05-03 22:33:08 +00:00
convert -background white -fill black -pointsize 80 -size 1000x caption:"$text" $LABEL_FILE
2021-05-03 22:29:47 +00:00
convert -gravity center $LABEL_FILE $STUFF_FILE +append $FILE
xclip -selection clipboard -t image/png -i $FILE