mirror of
https://github.com/Foltik/Shimapan
synced 2024-12-10 21:48:03 -05:00
Update pantsushot script
This commit is contained in:
parent
82ca61db4e
commit
e971a886b0
25
assets/tools/pantsushot
Normal file → Executable file
25
assets/tools/pantsushot
Normal file → Executable file
@ -3,37 +3,40 @@
|
|||||||
#Paste your api key directly after the "=" sign
|
#Paste your api key directly after the "=" sign
|
||||||
APIKEY=YOURAPIKEYHERE
|
APIKEY=YOURAPIKEYHERE
|
||||||
|
|
||||||
mkdir -p ~/Pictures/
|
mkdir -p ~/Pictures/Screenshots
|
||||||
DATE=$(date +"%Y-%m-%d_%H-%M-%S")
|
DATE=$(date +"%Y-%m-%d_%H-%M-%S")
|
||||||
FILE="$HOME/Pictures/Screenshots/$DATE.png"
|
FILE="$HOME/Pictures/Screenshots/$DATE.png"
|
||||||
if [ ! $# > 1 ];
|
if [ "$#" -gt 1 ];
|
||||||
then echo "Too many arguments supplied!
|
then echo "Too many arguments supplied!
|
||||||
(Try pantsushot --help)"
|
(Try pantsushot --help)"
|
||||||
exit;
|
exit;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $# == 0 ];
|
if [ $# == 0 ];
|
||||||
then gnome-screenshot -f $FILE $2;
|
then echo "Welcome to the pantsushot!
|
||||||
fi
|
|
||||||
case $1 in
|
|
||||||
-h )
|
|
||||||
echo "Welcome to the pantsushot!
|
|
||||||
Option Description
|
Option Description
|
||||||
|
|
||||||
-f Takes a fullscreen screenshot (default behavior)
|
-f Takes a fullscreen screenshot (default behavior)
|
||||||
-w Takes a screenshot of the focused window
|
-w Takes a screenshot of the focused window
|
||||||
-a Takes a screenshot of a selected area";
|
-a Takes a screenshot of a selected area";
|
||||||
exit;
|
exit;
|
||||||
;;
|
fi
|
||||||
|
|
||||||
|
case $1 in
|
||||||
-f )
|
-f )
|
||||||
gnome-screenshot -f $FILE $2;
|
gnome-screenshot -f $FILE $2;
|
||||||
;;
|
paplay /usr/share/sounds/freedesktop/stereo/screen-capture.oga
|
||||||
|
;;
|
||||||
-w )
|
-w )
|
||||||
gnome-screenshot -w -f $FILE $2;
|
gnome-screenshot -w -f $FILE $2;
|
||||||
;;
|
paplay /usr/share/sounds/freedesktop/stereo/screen-capture.oga
|
||||||
|
;;
|
||||||
-a )
|
-a )
|
||||||
gnome-screenshot -a -f $FILE $2;
|
gnome-screenshot -a -f $FILE $2;
|
||||||
;;
|
paplay /usr/share/sounds/freedesktop/stereo/screen-capture.oga
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
URL=$(curl -s -F "apikey=$APIKEY" -F "files[]=@$FILE" https://www.shimapan.rocks/upload.php | grep url | awk '{print $2}')
|
URL=$(curl -s -F "apikey=$APIKEY" -F "files[]=@$FILE" https://www.shimapan.rocks/upload.php | grep url | awk '{print $2}')
|
||||||
|
|
||||||
echo $URL | tr -d '[\\\,"\n]' | xclip -selection c
|
echo $URL | tr -d '[\\\,"\n]' | xclip -selection c
|
||||||
|
Loading…
Reference in New Issue
Block a user