X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fcallbacks.py;h=8c220e6451db1efd4430fdc940f1986ab9ffce3f;hb=220b5c40f91c6509951ccd0d506a9bd77d9d6bac;hp=024a197e3bea156117aaef6e0c3b41d484cc572e;hpb=95a11f35534a866514f9b8e9f5e929452c5df23a;p=chaz%2Fopenbox diff --git a/scripts/callbacks.py b/scripts/callbacks.py index 024a197e..8c220e64 100644 --- a/scripts/callbacks.py +++ b/scripts/callbacks.py @@ -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,14 +119,6 @@ def focus(data): return data.client.focus() -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() - def raise_win(data): """Raises the window on which the event occured""" if not data.client: return @@ -264,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"