Created
September 10, 2009 12:30
-
-
Save kiko/184522 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GRABS.merge!({ | |
'W-k' => lambda{ focus_next }, | |
'W-j' => lambda{ focus_previous }, | |
}) | |
module Subtlext | |
class Subtle | |
def move_focus(step) | |
i = current_view.clients.index{|c| c.id == current_client.id} + step | |
(current_view.clients[i] || current_view.clients.first).focus | |
end | |
def focus_next | |
move_focus(1) | |
end | |
def focus_previous | |
move_focus(-1) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment