init
This commit is contained in:
11
dev/eval.sh
Executable file
11
dev/eval.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# JavaScript in der nested Shell ausführen: dev/eval.sh 'code' oder dev/eval.sh datei.js
|
||||
SCRATCH=${SCRATCH:-/tmp/desktop-app-nested}
|
||||
export DBUS_SESSION_BUS_ADDRESS=$(cat "$SCRATCH/bus")
|
||||
if [ -f "$1" ]; then
|
||||
CODE="eval(new TextDecoder().decode(GLib.file_get_contents('$(realpath "$1")')[1]))"
|
||||
else
|
||||
CODE="$1"
|
||||
fi
|
||||
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "$CODE" \
|
||||
| sed -e 's/^(true, /OK /' -e 's/^(false, /FEHLER /'
|
||||
Reference in New Issue
Block a user