1 -- Goes to the frame in the specified direction. If there is no frame in the
2 -- given direction, it goes to the next workspace in the direction, being:
3 -- left = previous workspace
4 -- right = next workspace
6 -- By 2004, Rene van Bevern <rvb@pro-linux.de>
9 -- If you are about to go to a frame that would be left to the leftmost frame,
10 -- the function switches to a previous workspace and goes to its rightmost frame.
11 -- If you are about to go to a frame that would be right of the rightmost frame,
12 -- the function switches to the next workspace and goes to its leftmost frame.
14 -- To use this function you need to bind keys in the ionws_bindings
17 -- kpress(DEFAULT_MOD.."Down", function(f) go_frame_or_desk(f, "down") end),
18 -- kpress(DEFAULT_MOD.."Up", function(f) go_frame_or_desk(f, "up") end),
19 -- kpress(DEFAULT_MOD.."Right", function(f) go_frame_or_desk(f, "right") end),
20 -- kpress(DEFAULT_MOD.."Left", function(f) go_frame_or_desk(f, "left") end)
23 function go_frame_or_desk(ws, dir)
24 local reg = ws:current()
25 local scr = ws:screen_of()
26 if ws:next_to(reg,dir) then ws:goto_dir(dir)
27 elseif dir == "left" then
29 WRegion.goto(scr:current():rightmost())
30 elseif dir == "right" then
32 WRegion.goto(scr:current():leftmost())
36 function go_frame_or_desk_left(reg)
37 go_frame_or_desk(reg, "left")
40 function go_frame_or_desk_right(reg)
41 go_frame_or_desk(reg, "right")
44 function go_frame_or_desk_up(reg)
45 go_frame_or_desk(reg, "up")
48 function go_frame_or_desk_down(reg)
49 go_frame_or_desk(reg, "down")