-
Notifications
You must be signed in to change notification settings - Fork 6
/
cfg_tiling.lua
74 lines (54 loc) · 2.07 KB
/
cfg_tiling.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
--
-- Notion tiling module configuration file
--
-- Bindings for the tilings.
defbindings("WTiling", {
bdoc("Split current frame vertically."),
kpress(META.."S", "WTiling.split_at(_, _sub, 'bottom', true)"),
bdoc("Split current frame horizontally."),
kpress(META.."Shift+S", "WTiling.split_at(_, _sub, 'right', true)"),
bdoc("Destroy current frame."),
kpress(META.."U", "WTiling.unsplit_at(_, _sub)"),
})
-- Frame bindings
defbindings("WFrame.floating", {
submap(META.."K", {
bdoc("Tile frame, if no tiling exists on the workspace"),
kpress("B", "mod_tiling.mkbottom(_)"),
}),
})
-- Context menu for tiled workspaces.
defctxmenu("WTiling", "Tiling", {
menuentry("Destroy frame",
"WTiling.unsplit_at(_, _sub)"),
menuentry("Split vertically",
"WTiling.split_at(_, _sub, 'bottom', true)"),
menuentry("Split horizontally",
"WTiling.split_at(_, _sub, 'right', true)"),
menuentry("Flip", "WTiling.flip_at(_, _sub)"),
menuentry("Transpose", "WTiling.transpose_at(_, _sub)"),
menuentry("Untile", "mod_tiling.untile(_)"),
submenu("Float split", {
menuentry("At left",
"WTiling.set_floating_at(_, _sub, 'toggle', 'left')"),
menuentry("At right",
"WTiling.set_floating_at(_, _sub, 'toggle', 'right')"),
menuentry("Above",
"WTiling.set_floating_at(_, _sub, 'toggle', 'up')"),
menuentry("Below",
"WTiling.set_floating_at(_, _sub, 'toggle', 'down')"),
}),
submenu("At root", {
menuentry("Split vertically",
"WTiling.split_top(_, 'bottom')"),
menuentry("Split horizontally",
"WTiling.split_top(_, 'right')"),
menuentry("Flip", "WTiling.flip_at(_)"),
menuentry("Transpose", "WTiling.transpose_at(_)"),
}),
})
-- Extra context menu extra entries for floatframes.
defctxmenu("WFrame.floating", "Floating frame", {
append=true,
menuentry("New tiling", "mod_tiling.mkbottom(_)"),
})