[UP] use ion3-plus haha.
[arrow.git] / archlinux_conf / etc / ion3 / old / bookmarks.lua
blob63c9297bd2415d5ff75bab2057fb3b20b1a1f63b
1 --
2 -- Bookmarks support for Ion3
3 --
4 -- MOD1+b n Go to bookmark n (n=0..9)
5 -- MOD1+b Shift+n Set bookmark n
6 --
8 local bms={}
9 bookmarks={}
11 function bookmarks.set(bm, frame)
12 bms[bm]=frame
13 end
15 function bookmarks.goto(bm)
16 if bms[bm] then
17 bms[bm]:goto()
18 end
19 end
22 for k=0, 9 do
23 local bm=tostring(k)
24 defbindings("WScreen", {
25 submap(MOD1.."b", {
26 kpress(bm, function() bookmarks.goto(bm) end),
29 defbindings("WFrame", {
30 submap(MOD1.."b", {
31 kpress("Shift+"..bm,
32 function(frame) bookmarks.set(bm, frame) end),
35 end