]> Dogcows Code - chaz/openbox/blobdiff - scripts/callbacks.py
make python config variables very visible by making them all capitals. cleaner nicer...
[chaz/openbox] / scripts / callbacks.py
index 07dca05efb1aacca07754d5f8eb6e8b8325cbeed..8c220e6451db1efd4430fdc940f1986ab9ffce3f 100644 (file)
@@ -6,8 +6,14 @@ import ob
 import otk
 
 StateRemove = 0
+"""For the state_* callbacks. Indicates the state should be removed from the
+   window."""
 StateAdd = 1
+"""For the state_* callbacks. Indicates the state should be add to the
+   window."""
 StateToggle = 2
+"""For the state_* callbacks. Indicates the state should be toggled on the
+   window."""
 
 def state_above(data, add=StateAdd):
     """Toggles, adds or removes the 'above' state on a window.
@@ -113,10 +119,6 @@ def focus(data):
         return
     data.client.focus()
 
-def restart(data, other = ""):
-    """Restarts openbox, optionally starting another window manager."""
-    ob.openbox.restart(other)
-
 def raise_win(data):
     """Raises the window on which the event occured"""
     if not data.client: return
@@ -260,4 +262,12 @@ def send_to_prev_desktop(data, no_wrap=0, follow=1):
     if follow:
         change_desktop(data, d)
 
+def restart(data=0, other = ""):
+    """Restarts Openbox, optionally starting another window manager."""
+    ob.openbox.restart(other)
+
+def exit(data=0):
+    """Exits Openbox."""
+    ob.openbox.shutdown()
+
 print "Loaded callbacks.py"
This page took 0.020453 seconds and 4 git commands to generate.