1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#!/bin/bash
# Load functions
. /usr/share/gparted/bin/gl-functions
DIALOG=zenity
$DIALOG --title "SCREENSHOT" --info --text "If you want to take a screenshot, select the window you want when the cross-pointer appears.";
if [ $? = 1 -o $? = 255 ];then
exit
fi
sleep 1
[ -f ${HOME}/gpartedss ] && rm -f ${HOME}/gpartedss
[ -f ${HOME}/gparted.jpeg ] && rm -f ${HOME}/gparted.jpeg
xwd -out ${HOME}/gpartedss
xwdtopnm < ${HOME}/gpartedss | pnmtojpeg > ${HOME}/gparted.jpeg
[ -f ${HOME}/gpartedss ] && rm -f ${HOME}/gpartedss
if [ -f ${HOME}/gparted.jpeg ]; then
feh -q -d --title "Preview -- Your full screen shot is ${HOME}/gparted.jpeg" ${HOME}/gparted.jpeg & $DIALOG --title "GParted LiveCD" --info --text "A screen shot named gparted.jpeg is located in ${HOME}";
else
$DIALOG --title "GParted LiveCD" --info --text "Failed to get screen shot. :-/";
fi
|