Enable stuffing a window.
[screen-lua.git] / src / scripts / movewindow.lua
blob65cca2ad65d4438ca9031079686e9d34b883a23f
1 function toleft()
2 local w = screen.display().fore
3 if w.number > 0 then
4 w.number = w.number - 1
5 end
6 end
8 function toright()
9 local w = screen.display().fore
10 w.number = w.number + 1
11 end
13 function newonright()
14 local w = screen.display().fore
15 local wl = screen.windows()
16 local n = w.number
17 while true do
18 local wn = wl[w.number + 1]
19 if wn == nil then
20 break
21 else
22 w = wn
23 end
24 end
25 while w.number > n do
26 local wn = wl[w.number - 1]
27 w.number = w.number + 1
28 w = wn
29 end
31 screen.command("screen")
32 end
34 function list()
35 local wl = screen.windows()
36 if wl[1] ~=nil then
37 wl[1]:stuff("ls\n")
38 end
39 end