-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkeybinds-example.lua
More file actions
61 lines (50 loc) · 1.63 KB
/
Copy pathkeybinds-example.lua
File metadata and controls
61 lines (50 loc) · 1.63 KB
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
-- Switch or send focused window to primary
for i = 1, 10 do
local index = i
hl.bind("SUPER + F" .. tostring(index), function()
hl.plugin.splitrow.showprimaryprofile(index)
end)
hl.bind("SUPER + SHIFT + F" .. tostring(index), function()
hl.plugin.splitrow.sendprimaryprofile(index)
end)
end
-- Switch or send focused window to secondary
for i = 1, 10 do
local index = i
hl.bind("SUPER + code:" .. tostring(index), function()
hl.dispatch(hl.dsp.focus({ workspace = workspace_in_group(i) }))
hl.bind("SUPER + SHIFT + code:" .. tostring(index), function()
hl.plugin.splitrow.movetoworkspace(i)
end)
end
-- Move focused window between primary and secondary
hl.bind("SUPER + SHIFT + Up", function()
hl.plugin.splitrow.moveprimary()
end)
hl.bind("SUPER + SHIFT + Down", function()
hl.plugin.splitrow.movesecondary()
end)
-- Set split axis and split ratio
hl.bind("SUPER + ALT + 1", function()
hl.plugin.splitrow.setsplitaxis("horizontal")
hl.plugin.splitrow.setsplitratio(1 / 3)
end)
hl.bind("SUPER + ALT + 2", function()
hl.plugin.splitrow.setsplitaxis("horizontal")
hl.plugin.splitrow.setsplitratio(1 / 2)
end)
hl.bind("SUPER + ALT + 3", function()
hl.plugin.splitrow.setsplitaxis("horizontal")
hl.plugin.splitrow.setsplitratio(2 / 3)
end)
-- Toggle pseudo/fake fullscreen on focused window
hl.bind("SUPER + D", function()
hl.plugin.splitrow.togglefocusedfullscreen()
end)
-- Resize focused window
hl.bind("SUPER + ALT + Left", function()
hl.plugin.splitrow.shrinkfocused()
end, { repeating = true })
hl.bind("SUPER + ALT + Right", function()
hl.plugin.splitrow.growfocused()
end, { repeating = true })