截图后将图片添加到粘贴板
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
timestamp="$(date +%Y%m%d%H%M%S)"
|
TIMESTAMP="$(date +%Y%m%d%H%M%S)"
|
||||||
targetbase="$HOME/screenshots"
|
TARGETBASE="$HOME/screenshots"
|
||||||
mkdir -p $targetbase
|
mkdir -p $TARGETBASE
|
||||||
|
FILENAME="$TARGETBASE/${TIMESTAMP}.png"
|
||||||
[ -d $targetbase ] || exit 1
|
[ -d $targetbase ] || exit 1
|
||||||
scrot -s $targetbase/$timestamp.png
|
scrot -s $FILENAME
|
||||||
|
|
||||||
|
if [[ -n $(type -p xclip) ]]; then
|
||||||
|
xclip -selection clipboard -t image/png $FILENAME
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user