-
Notifications
You must be signed in to change notification settings - Fork 7
/
strata.default.lua
118 lines (112 loc) · 2.15 KB
/
strata.default.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
local strata = require("strata")
local function close_all_windows()
for _, window in ipairs(strata.current_workspace:get_windows()) do
window:close()
end
end
local config = {
autostart = {
{ "kitty --title Terminal" },
},
general = {
workspaces = 9,
gaps_in = 8,
gaps_out = 12,
kb_repeat = { 500, 250 },
},
decorations = {
border = {
enable = true,
width = 2,
active = "#FFF",
inactive = "#131418",
radius = 5,
},
window = {
opacity = 0.9,
},
blur = {
enable = true,
size = 2,
passes = 3,
optimize = true,
},
shadow = {
enable = true,
size = 2,
blur = 3,
color = "#FFF",
},
},
tiling = {
layout = "dwindle",
},
animations = {
enable = true,
},
bindings = {
{
keys = { "Super_L", "Return" },
action = strata.actions.spawn("kitty --title Terminal"),
},
{
keys = { "Super_L", "space" },
action = strata.actions.spawn("rofi --show drun"),
},
{
keys = { "Alt_L", "q" },
action = strata.window.close,
},
{
keys = { "Alt_L", "m" },
action = strata.actions.quit,
},
{
keys = { "Super_L", "b" },
action = function() -- Toggle border
local border_enabled = strata.get_config().decorations.border.enable
strata.update_config {
decorations = {
border = {
enable = not border_enabled,
},
},
}
end,
},
},
rules = {
{
triggers = { { event = "win_open_pre", class_name = "firefox" } },
action = function(window) window:send_to_workspace(1) end,
},
{
triggers = {
{ event = "win_open_pre", class_name = "mpv" },
{ event = "win_open_pre", workspace = 1, class_name = "kitty" },
},
action = function(window) window:set_floating() end,
},
strata.rules.bind_to_workspace {
{ 1, "firefox" },
{ 2, "neovide" },
{ 10, "slack" },
},
strata.rules.set_floating {
"mpv",
},
},
}
for i = 1, 10 do
table.insert(config.bindings, {
keys = { "Alt_L", tostring(i) },
action = strata.workspace.switch(i)
})
end
for i = 1, 10 do
table.insert(config.bindings, {
keys = { "Alt_L", "Shift_L", tostring(i) },
action = strata.window.move(i, { follow = true })
})
end
strata.set_config(config)