summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <joel@JOEL-UBUNTU.(none)>2007-12-08 21:20:44 +0900
committerJoel Bosveld <joel@JOEL-UBUNTU.(none)>2007-12-08 21:20:44 +0900
commit540679ccb8e3abc018a6cd4f2d465e56254b93d8 (patch)
tree656903e5d2fe9395aa74911124b56e079160f167
parent3041e5b70d837f3aae2cee6c30054d12a6f7b1cf (diff)
downloadcubedbus-540679ccb8e3abc018a6cd4f2d465e56254b93d8.tar.gz
cubedbus-540679ccb8e3abc018a6cd4f2d465e56254b93d8.tar.bz2
Added some scripts.
photowheel.sh requires 4 arguments, which are the /path/to/image window.sh can just be run, then click on a window to draw it in cube test.sh needs 3 arguments, which are the /path/to/image and also click on a window to draw that window in a photowheel with the other 3 images (note that this does not work for some reason (whether script or cubedbus related I don't know yet))
-rwxr-xr-xscripts/photowheel.sh62
-rwxr-xr-xscripts/test.sh47
-rwxr-xr-xscripts/window.sh3
3 files changed, 112 insertions, 0 deletions
diff --git a/scripts/photowheel.sh b/scripts/photowheel.sh
new file mode 100755
index 0000000..d75f023
--- /dev/null
+++ b/scripts/photowheel.sh
@@ -0,0 +1,62 @@
+dbus-send --type=method_call --dest=org.freedesktop.compiz \
+/org/freedesktop/compiz/cubedbus/allscreens/add \
+org.freedesktop.compiz.activate \
+ string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` \
+ string:'type' int32:1 \
+ string:'name' string:'root.photowheel' \
+ string:'rotateSpeed' double:0.5 \
+ string:'rotateY' double:1.0 \
+ string:'translateX' double:0.5 \
+ string:'translateY' double:0.5 \
+ string:'translateZ' double:0.5 \
+ string:'scaleX' double:0.5 \
+ string:'scaleY' double:0.25 \
+ string:'scaleZ' double:0.5
+
+dbus-send --type=method_call --dest=org.freedesktop.compiz \
+/org/freedesktop/compiz/cubedbus/allscreens/add \
+org.freedesktop.compiz.activate \
+ string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` \
+ string:'type' int32:3 \
+ string:'name' string:'root.photowheel.p1' \
+ string:'file' string:$1 \
+ string:'x0' double:-0.5 string:'y0' double:0.5 string:'z0' double:0.5 \
+ string:'x1' double:0.5 string:'y1' double:0.5 string:'z1' double:0.5 \
+ string:'x2' double:0.5 string:'y2' double:-0.5 string:'z2' double:0.5 \
+ string:'x3' double:-0.5 string:'y3' double:-0.5 string:'z3' double:0.5
+
+dbus-send --type=method_call --dest=org.freedesktop.compiz \
+/org/freedesktop/compiz/cubedbus/allscreens/add \
+org.freedesktop.compiz.activate \
+ string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` \
+ string:'type' int32:3 \
+ string:'name' string:'root.photowheel.p2' \
+ string:'file' string:$2 \
+ string:'x0' double:0.5 string:'y0' double:0.5 string:'z0' double:0.5 \
+ string:'x1' double:0.5 string:'y1' double:0.5 string:'z1' double:-0.5 \
+ string:'x2' double:0.5 string:'y2' double:-0.5 string:'z2' double:-0.5 \
+ string:'x3' double:0.5 string:'y3' double:-0.5 string:'z3' double:0.5
+
+dbus-send --type=method_call --dest=org.freedesktop.compiz \
+/org/freedesktop/compiz/cubedbus/allscreens/add \
+org.freedesktop.compiz.activate \
+ string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` \
+ string:'type' int32:3 \
+ string:'name' string:'root.photowheel.p3' \
+ string:'file' string:$3 \
+ string:'x0' double:0.5 string:'y0' double:0.5 string:'z0' double:-0.5 \
+ string:'x1' double:-0.5 string:'y1' double:0.5 string:'z1' double:-0.5 \
+ string:'x2' double:-0.5 string:'y2' double:-0.5 string:'z2' double:-0.5 \
+ string:'x3' double:0.5 string:'y3' double:-0.5 string:'z3' double:-0.5
+
+dbus-send --type=method_call --dest=org.freedesktop.compiz \
+/org/freedesktop/compiz/cubedbus/allscreens/add \
+org.freedesktop.compiz.activate \
+ string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` \
+ string:'type' int32:3 \
+ string:'name' string:'root.photowheel.p2' \
+ string:'file' string:$4 \
+ string:'x0' double:-0.5 string:'y0' double:0.5 string:'z0' double:-0.5 \
+ string:'x1' double:-0.5 string:'y1' double:0.5 string:'z1' double:0.5 \
+ string:'x2' double:-0.5 string:'y2' double:-0.5 string:'z2' double:0.5 \
+ string:'x3' double:-0.5 string:'y3' double:-0.5 string:'z3' double:-0.5
diff --git a/scripts/test.sh b/scripts/test.sh
new file mode 100755
index 0000000..76bc04e
--- /dev/null
+++ b/scripts/test.sh
@@ -0,0 +1,47 @@
+dbus-send --type=method_call --dest=org.freedesktop.compiz \
+/org/freedesktop/compiz/cubedbus/allscreens/add \
+org.freedesktop.compiz.activate \
+ string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` \
+ string:'type' int32:1 \
+ string:'name' string:'root.photowheel' \
+ string:'rotateSpeed' double:0.5 \
+ string:'rotateY' double:1.0 \
+
+
+dbus-send --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/cubedbus/allscreens/add org.freedesktop.compiz.activate string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` string:'type' int32:4 string:'name' string:'root.photowheel.p1' string:'x0' double:-0.5 string:'y0' double:0.5 string:'z0' double:-0.5 string:'x1' double:-0.5 string:'y1' double:0.5 string:'z1' double:0.5 string:'x2' double:-0.5 string:'y2' double:-0.5 string:'z2' double:0.5 string:'x3' double:-0.5 string:'y3' double:-0.5 string:'z3' double:-0.5 string:'win' int32:` xwininfo | grep id: | awk '{ print $4 }'`
+
+dbus-send --type=method_call --dest=org.freedesktop.compiz \
+/org/freedesktop/compiz/cubedbus/allscreens/add \
+org.freedesktop.compiz.activate \
+ string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` \
+ string:'type' int32:3 \
+ string:'name' string:'root.photowheel.p2' \
+ string:'file' string:$1 \
+ string:'x0' double:0.5 string:'y0' double:0.5 string:'z0' double:0.5 \
+ string:'x1' double:0.5 string:'y1' double:0.5 string:'z1' double:-0.5 \
+ string:'x2' double:0.5 string:'y2' double:-0.5 string:'z2' double:-0.5 \
+ string:'x3' double:0.5 string:'y3' double:-0.5 string:'z3' double:0.5
+
+dbus-send --type=method_call --dest=org.freedesktop.compiz \
+/org/freedesktop/compiz/cubedbus/allscreens/add \
+org.freedesktop.compiz.activate \
+ string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` \
+ string:'type' int32:3 \
+ string:'name' string:'root.photowheel.p3' \
+ string:'file' string:$2 \
+ string:'x0' double:0.5 string:'y0' double:0.5 string:'z0' double:-0.5 \
+ string:'x1' double:-0.5 string:'y1' double:0.5 string:'z1' double:-0.5 \
+ string:'x2' double:-0.5 string:'y2' double:-0.5 string:'z2' double:-0.5 \
+ string:'x3' double:0.5 string:'y3' double:-0.5 string:'z3' double:-0.5
+
+dbus-send --type=method_call --dest=org.freedesktop.compiz \
+/org/freedesktop/compiz/cubedbus/allscreens/add \
+org.freedesktop.compiz.activate \
+ string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` \
+ string:'type' int32:3 \
+ string:'name' string:'root.photowheel.p4' \
+ string:'file' string:$3 \
+ string:'x0' double:-0.5 string:'y0' double:0.5 string:'z0' double:-0.5 \
+ string:'x1' double:-0.5 string:'y1' double:0.5 string:'z1' double:0.5 \
+ string:'x2' double:-0.5 string:'y2' double:-0.5 string:'z2' double:0.5 \
+ string:'x3' double:-0.5 string:'y3' double:-0.5 string:'z3' double:-0.5
diff --git a/scripts/window.sh b/scripts/window.sh
new file mode 100755
index 0000000..228a4b8
--- /dev/null
+++ b/scripts/window.sh
@@ -0,0 +1,3 @@
+dbus-send --type=method_call --dest=org.freedesktop.compiz /org/freedesktop/compiz/cubedbus/allscreens/add org.freedesktop.compiz.activate string:'root' int32:`xwininfo -root | grep id: | awk '{ print $4 }'` string:'type' int32:4 string:'name' string:'root.window' string:'x0' double:-0.5 string:'y0' double:0.5 string:'z0' double:-0.5 string:'x1' double:-0.5 string:'y1' double:0.5 string:'z1' double:0.5 string:'x2' double:-0.5 string:'y2' double:-0.5 string:'z2' double:0.5 string:'x3' double:-0.5 string:'y3' double:-0.5 string:'z3' double:-0.5 string:'win' int32:` xwininfo | grep id: | awk '{ print $4 }'`
+
+#Run this in terminal - then click on a window to draw it in cube