X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fskel%2F.ion2%2Fgo_frame_or_desk.lua;fp=etc%2Fskel%2F.ion2%2Fgo_frame_or_desk.lua;h=0000000000000000000000000000000000000000;hb=28cdedbfbd198c31d1d27b40f21321f81afdb396;hp=5141fad3a5602a259162bbc29ca7cbd6a005e04c;hpb=365d21548c9681527a599e648fd77a5b07c9ae53;p=grml-desktop.git diff --git a/etc/skel/.ion2/go_frame_or_desk.lua b/etc/skel/.ion2/go_frame_or_desk.lua deleted file mode 100644 index 5141fad..0000000 --- a/etc/skel/.ion2/go_frame_or_desk.lua +++ /dev/null @@ -1,50 +0,0 @@ --- Goes to the frame in the specified direction. If there is no frame in the --- given direction, it goes to the next workspace in the direction, being: --- left = previous workspace --- right = next workspace --- --- By 2004, Rene van Bevern --- Public Domain --- --- If you are about to go to a frame that would be left to the leftmost frame, --- the function switches to a previous workspace and goes to its rightmost frame. --- If you are about to go to a frame that would be right of the rightmost frame, --- the function switches to the next workspace and goes to its leftmost frame. --- --- To use this function you need to bind keys in the ionws_bindings --- --- ionws_bindings { --- kpress(DEFAULT_MOD.."Down", function(f) go_frame_or_desk(f, "down") end), --- kpress(DEFAULT_MOD.."Up", function(f) go_frame_or_desk(f, "up") end), --- kpress(DEFAULT_MOD.."Right", function(f) go_frame_or_desk(f, "right") end), --- kpress(DEFAULT_MOD.."Left", function(f) go_frame_or_desk(f, "left") end) --- } - -function go_frame_or_desk(ws, dir) - local reg = ws:current() - local scr = ws:screen_of() - if ws:next_to(reg,dir) then ws:goto_dir(dir) - elseif dir == "left" then - scr:switch_prev() - WRegion.goto(scr:current():rightmost()) - elseif dir == "right" then - scr:switch_next() - WRegion.goto(scr:current():leftmost()) - end -end - -function go_frame_or_desk_left(reg) - go_frame_or_desk(reg, "left") -end - -function go_frame_or_desk_right(reg) - go_frame_or_desk(reg, "right") -end - -function go_frame_or_desk_up(reg) - go_frame_or_desk(reg, "up") -end - -function go_frame_or_desk_down(reg) - go_frame_or_desk(reg, "down") -end