Repository navigation
Expand file tree
/
Copy pathdefault.lua
More file actions
133 lines (115 loc) · 3.63 KB
/
Copy pathdefault.lua
File metadata and controls
133 lines (115 loc) · 3.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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
-- Create a monitor. We use '*' to choose all monitors.
local monitor = monitor.new({
name = "*",
mode = "preferred",
scale = 1,
rotate = 0
})
-- Load screenshot plugin. This returns
-- a table of actions that can be used to
-- initialize the screenshot picker.
local screenshot = plugin("@boring/screenshot"):mount()
-- Notifications from applications (over D-Bus), stacked in the
-- top-right corner.
local notifications = plugin("@boring/notifications"):mount()
-- The launcher: a search field for applications, windows and
-- arithmetic. Super+Space opens it.
local launcher = plugin("@boring/launcher"):mount({
terminal = "foot",
})
-- Create our keyboard input device. This will apply
-- to all keyboards.
input.keyboard.new({
name = "*",
["repeat"] = {
delay = 300,
rate = 30
},
xkb = {
layout = "us"
},
shortcuts = {
-- Actions are callbacks managed by the compositor.
-- To manually trigger an action, invoke :run(...).
["Mod4+Return"] = actions.execute("xeyes"),
["Mod4+q"] = actions.close,
["Mod4+Shift+q"] = actions.exit,
["Mod4+c"] = actions.reload,
["Mod4+space"] = launcher.actions.toggle,
["Mod4+n"] = notifications.actions.dismiss_all,
["Mod4+Shift+n"] = notifications.actions.toggle_dnd,
-- Screenshot-related binds.
["PrintScreen"] = screenshot.actions.area,
["Ctrl+PrintScreen"] = screenshot.actions.fullscreen,
["Alt+PrintScreen"] = screenshot.actions.window,
}
})
-- Create our mouse input device. This will apply
-- to all mice.
input.mouse.new({
name = "*",
handedness = "right",
-- Between -1 and 1. nil disables acceleration.
acceleration = 0.5,
-- Adjust scroll settings.
scroll = {
natural = false,
speed = 10,
}
})
-- Load xwayland.
plugin("@boring/xwayland"):mount()
-- Run Lua in the compositor from a shell: ./boring.lua -e 'return boring.windows()'
-- (or ./boring.lua -i for a REPL). Only you can reach it.
plugin("@boring/ipc"):mount()
-- The @boring/borders plugin adds pixel borders
-- to windows.
plugin("@boring/borders"):mount({
colors = {
normal = "#737373",
focused = "#f59e0b",
urgent = "#ef4444",
}
})
-- The @boring/layout-stacking plugin provides
-- a very traditional stacking layout. Simple
-- server-side decorations are also rendered.
plugin("@boring/layout-stacking"):mount({
theme = {
-- Color of the title's text.
title = "#0a0a0a",
-- Color of the decoration (title bar).
decorations = "#f59e0b",
-- Colors of the buttons.
button_background = "#f59e0b",
button_foreground = "#0a0a0a",
},
-- Title bar controls, left to right. Buttons with the
-- icons minimize, maximize and close do what they say;
-- give any button an on_click to do something else.
controls = {
{ type = "title" },
{ type = "spacer" },
{ type = "button", icon = "minimize" },
{ type = "button", icon = "maximize" },
{
type = "button",
icon = "close",
on_click = function(window)
window:close()
end
},
}
})
-- Windows fade in when they open and out when they close.
plugin("@boring/animations"):mount()
-- Wallpapers!
plugin("@boring/wallpaper"):mount({
-- Keys are the monitors you want to apply wallpapers to.
[monitor] = "#fef3c7",
-- For an image, you can use the following.
-- [monitor] = {
-- image = "/path/to/wallpaper.jpg",
-- scale = "fill", -- fill, fit, stretch, center, tile
-- }
})