X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=scripts%2Fstackedcycle.py;h=5731a56456b82f641687d393d63ea48c18d9d6eb;hb=8a05ae261d640df3844fdae942556793c62bd073;hp=791a93a2f615cd3e8fbc88b90f6a2df394ddd5a2;hpb=741aecf842563284f4e756bf3d935d551aaad8fa;p=chaz%2Fopenbox diff --git a/scripts/stackedcycle.py b/scripts/stackedcycle.py index 791a93a2..5731a564 100644 --- a/scripts/stackedcycle.py +++ b/scripts/stackedcycle.py @@ -4,7 +4,6 @@ ########################################################################### ### Options that affect the behavior of the stackedcycle module. ### -### Also see the options in the focus module. ### ########################################################################### include_all_desktops = 0 """If this is non-zero then windows from all desktops will be included in @@ -22,14 +21,22 @@ title_size_limit = 80 activate_while_cycling = 1 """If this is non-zero then windows will be activated as they are highlighted in the cycling list (except iconified windows).""" +# See focus.avoid_skip_taskbar +# See focuscycle.raise_window ########################################################################### def next(data): """Focus the next window.""" + if not data.state: + raise RuntimeError("stackedcycle.next must be bound to a key" + + "combination with at least one modifier") _o.cycle(data, 1) def previous(data): """Focus the previous window.""" + if not data.state: + raise RuntimeError("stackedcycle.previous must be bound to a key" + + "combination with at least one modifier") _o.cycle(data, 0) ########################################################################### @@ -42,6 +49,7 @@ def previous(data): import otk import ob import focus +import focuscycle class cycledata: def __init__(self): @@ -160,7 +168,7 @@ class cycledata: # send a net_active_window message for the target if final or not client.iconic(): - if final: r = focus.raise_window + if final: r = focuscycle.raise_window else: r = 0 ob.send_client_msg(self.screeninfo.rootWindow(), otk.Property_atoms().openbox_active_window, @@ -229,3 +237,5 @@ ob.ebind(ob.EventAction.NewWindow, _newwindow) ob.ebind(ob.EventAction.CloseWindow, _closewindow) _o = cycledata() + +print "Loaded stackedcycle.py"