#!/bin/bash
pdf=$1
username=$2
action=${3:-"default"}
export DISPLAY=:0.0
case $action in
default)
notify-more -u low -t 10000 -i /opt/Adobe/Reader8/Resource/Icons/32x32/adobe.pdf.png -n "Open" -x "gnome-open \"$pdf\"" -n "Move" -x "$0 \"$pdf\" \"$username\" move" "PDF Printed" "PDF printed to $pdf" -n "Clipboard" -x "echo -n $pdf | xsel -i -b";;
move)
dest=`zenity --file-selection --title "Save PDF" --save --confirm-overwrite`
if [ "$dest" ]; then
mv "$pdf" "$dest"
if [ -e "$dest" ]; then
notify-more -u low -t 5000 -i /usr/share/icons/gnome/32x32/actions/gtk-paste.png "PDF Saved" "PDF saved to $dest" -n "Open" -x "gnome-open \"$dest\"" -n "Clipboard" -x "echo -n $dest | xsel -i -b"
else
notify-more -u high -t 5000 -i /usr/share/icons/gnome/32x32/emblems/stock_mail-priority-high.png "Save Failed" "Unable to move PDF. The original is stored at $pdf"
fi
fi;;
esac
Mozilla's Updated ToS: We Own All Info You Put Into Firefox
33 minutes ago
No comments:
Post a Comment