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 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#!/bin/sh
# This is a helper program to execute saved command files,
# by sending them to a running instance of Kupfer.
export TEXTDOMAIN='@PACKAGE@'
export TEXTDOMAINDIR='@LOCALEDIR@'
PYTHON='@PYTHON@'
if test ! -f "$1"
then
echo "A file argument required"
exit 1
fi
SERVICE="io.github.kupferlauncher"
OBJ="/io/github/kupferlauncher"
IFACE="io.github.kupferlauncher.Listener"
while test $# != 0
do
FILE=$(readlink -f "$1")
dbus-send --print-reply --dest=$SERVICE $OBJ \
$IFACE.ExecuteFileOnDisplay string:"$FILE" \
string:"$DISPLAY" string:"$DESKTOP_STARTUP_ID" \
> /dev/null 2>&1
KUPFER_RUNNING=$?
if test $KUPFER_RUNNING != 0
then
# NOTE: If you change this string, you have to change
# it inside kupfer/version.py as well.
zenity --info --text "$(gettext 'Could not find running Kupfer')" &
exit 1
fi
shift
done
|