summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-31 07:19:32 +0000
committerDana Jansens <danakj@orodu.net>2002-12-31 07:19:32 +0000
commit103372b02f783053c69f8f94db2c0e161f3e7d93 (patch)
tree363d36fc94dbb03c13634d61a182048c08d2e1fb /scripts
parenta6661d587cd043e1894418c091b8dbd4e18a7d55 (diff)
create some globals for use in the python scripts
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am2
-rw-r--r--scripts/globals.py9
2 files changed, 10 insertions, 1 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index ecf86a22..5b55ecae 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,6 +1,6 @@
scriptdir = $(libdir)/openbox/python
MAINTAINERCLEANFILES = Makefile.in
-script_DATA = clientmotion.py clicks.py
+script_DATA = clientmotion.py clicks.py globals.py
EXTRA_DIST = $(script_DATA)
distclean-local:
diff --git a/scripts/globals.py b/scripts/globals.py
new file mode 100644
index 00000000..98f71c34
--- /dev/null
+++ b/scripts/globals.py
@@ -0,0 +1,9 @@
+# openbox - pointer to the current Openbox instance
+openbox = Openbox_instance()
+
+# screen - list of all screens in the current openbox instance
+screen = []
+for i in range(Openbox_screenCount(openbox)):
+ screen.append(Openbox_screen(openbox, i))
+
+print "Loaded globals.py"