This repository has been archived by the owner on Oct 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.def.lua
316 lines (288 loc) · 10.2 KB
/
config.def.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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
-- Table of colors used in the theme below.
local colors = {
-- Foreground color.
fg = '#444444',
-- Background color.
bg = '#fafafa',
-- Alternative background color.
bg_alt = "#bcbcbc",
-- Focused color.
focus = '#005f87',
}
-- The visual theme.
theme {
-- Font for the bar, given as a Pango Font Description string without the size,
-- e.g. `Liberation Mono`.
font_name = 'monospace',
-- Size of the font in pixels.
font_size = 12,
-- Space added to the top and bottom of the bar,
-- i.e. bar height = `font_size` + `bar_padding`.
bar_padding = 4,
-- Space to the left and right of widgets in the bar's information area.
info_margins = 10,
-- Percentage of the screen occupied by the master client,
-- given as a value between 0.1 and 1.0.
master_width = 0.6,
-- Space surrounding tiled clients.
useless_gap = 2,
-- Add space around clients even if only one is visible.
gap_single_client = false,
-- Width of borders around clients.
border_width = 2,
-- Width of borders around notifications.
notification_border_width = 1,
-- Normal foreground color of the bar's text.
fg_normal = colors.fg,
-- Normal background color of the bar.
bg_normal = colors.bg,
-- Alternative background color, used in the audio widget's volume bar.
bg_normal_alt = colors.bg_alt,
-- Border color of unfocused tiled clients.
border_normal = colors.bg,
-- Border color of unfocused floating clients.
border_normal_floating = colors.bg_alt,
-- Border color of notifications.
notification_border_color = colors.fg,
-- Focused foreground color of the bar's text.
fg_focus = colors.bg,
-- Focused background color of the bar.
bg_focus = colors.focus,
-- Border color of the focused client.
border_focus = colors.focus,
-- Path to image file or hex color to be used as the desktop wallpaper.
desktop_wallpaper = colors.bg,
-- Format of clock in the information area of the bar.
-- See: https://developer.gnome.org/pygtk/stable/pango-markup-language.html
clock_format = '<span size=\'smaller\' rise=\'1000\'></span> %a, %b %e %l:%M%P',
}
-- Info widgets list.
-- Available widgets: audio, battery, pomodoro
widgets {
'pomodoro',
'battery',
'audio',
}
-- General options.
options {
-- Position of client stack, one of:
-- `left`, `right`, `top`, `bottom`.
stack_position = 'left',
-- Percentage of the screen occupied by the focal client,
-- given as a value between 0.1 and 1.0.
focal_width = 0.5,
-- Name of the main workspace.
main_workspace_name = 'main',
-- Name of a newly created workspace.
scratch_workspace_name = 'scratch',
-- Rename workspaces after the focused client's class.
rename_scratch_workspaces = true,
-- Paths to search for `.workspace` files.
-- See: https://github.com/jcrd/wm-launch#workspace-files
workspace_search_paths = {},
-- Name of the backlight to control, as found in `/sys/class/backlight/<name>`.
-- The special value `default` signifies the first backlight.
backlight_name = 'default',
-- Value by which to increment or decrement backlight brightness.
brightness_step = 10,
-- Value by which to increment or decrement audio sink volume.
volume_step = 0.05,
-- Hide the mouse pointer when the window manager starts.
hide_mouse_on_startup = true,
-- Allow maximized clients, workaround for clients that set maximized hints
-- and therefore refuse to be tiled.
allow_maximized_clients = false,
-- Percentage at which you will be notified the battery is low.
battery_low_percent = 10,
-- Percentage at which you will be notified the battery is charged.
battery_charged_percent = 95,
-- Give volume feedback via notifications when a fullscreen client is
-- focused.
fullscreen_audio_notifications = true,
-- Directory where screenshots are saved.
screenshot_directory = '~/screenshots',
-- Pomodoro options.
pomodoro = {
-- Working timer duration in seconds.
working = 25 * 60,
-- Short break timer duration in seconds.
short_break = 5 * 60,
-- Long break timer duration in seconds.
long_break = 20 * 60,
-- Working timer repetitions per set.
set_length = 4,
},
}
-- Notification options.
notifications {
-- Notification position, one of:
-- `top_right`, `top_left`, `bottom_left`, `bottom_right`,
-- `top_middle`, `bottom_middle`, `middle`.
position = 'top_middle',
-- Time in seconds after which notifications expire.
timeout = 5,
}
-- Table of clients.
local clients = {
-- Web browser.
chromium = {
cmd = 'chromium',
factory = 'chromium',
},
-- Terminal, launched as master client.
terminal = {
cmd = 'kitty',
set_master = true,
},
-- Terminal, launched as centered pop-up panel.
panel = {
cmd = 'kitty',
id = 'panel_terminal',
scale = 0.6,
},
}
-- Register workspace clients.
workspace_clients(clients)
-- Workspaces for use with `cmd.workspace.new`.
local workspaces = {
-- Workspace with a terminal instance running `nvim`.
edit = {
name = 'edit',
clients = { 'kitty -e nvim' },
},
}
-- Global key bindings.
keys {
-- Menu.
-- Open application run menu.
['M-p'] = cmd.menu.run,
-- Open application run menu and send launched client to a new workspace.
['M-S-p'] = cmd.menu.run_workspace,
-- Create a new workspace from a `.workspace` file.
['M-w'] = cmd.menu.new_workspace,
-- Prompt for new name of current workspace.
['M-r'] = cmd.menu.rename_workspace,
-- Prompt for new taskwarrior task.
['M-n'] = cmd.menu.capture_task,
-- Create `edit` workspace.
['M-e'] = {cmd.workspace.new, workspaces.edit},
-- Launch clients.
-- Launch main terminal instance.
['M-Return'] = {cmd.launch, clients.terminal},
-- Toggle panel's visibility.
['M-grave'] = {cmd.workspace.toggle_panel, clients.panel},
-- Workspaces.
-- Select the previously selected workspace.
['M-Tab'] = cmd.workspace.restore,
-- Select the next workspace, wrapping at the workspace list's end.
['M-S-j'] = cmd.workspace.next,
-- Select the previous workspace, wrapping the workspace list's beginning.
['M-S-k'] = cmd.workspace.prev,
-- Select the workspace corresponding to the number key pressed.
['M-<numrow>'] = cmd.workspace.view,
-- Move a client to the specified workspace and select it.
['M-S-<numrow>'] = cmd.client.follow_to_workspace,
-- Move a client to the specified workspace.
['M-C-<numrow>'] = cmd.client.move_to_workspace,
-- Increase size of stack clients.
['M-period'] = {cmd.workspace.adjust_width, 0.1},
-- Decrease size of stack clients.
['M-comma'] = {cmd.workspace.adjust_width, -0.1},
-- Clients.
-- Focus the next client in the stack.
['M-j'] = cmd.client.focus.next,
-- Focus the previous client in the stack.
['M-k'] = cmd.client.focus.prev,
-- Toggle focus between the master client and the top stack client.
['M-s'] = cmd.client.focus.other,
-- Toggle focus between the tiled and floating layers.
['M-S-s'] = cmd.client.focus.other_layer,
-- Swap top stack client with master, focusing master.
['M-a'] = cmd.client.master.promote,
-- Swap master client with top stack, focusing stack.
['M-d'] = cmd.client.master.demote,
-- Send master client to bottom of stack and replace with top stack client,
-- maintaining focus.
['M-q'] = cmd.client.master.cycle,
-- Maximize clients.
['M-o'] = cmd.client.toggle_max,
-- Center the focused client.
['M-f'] = cmd.client.toggle_focal,
-- Restore the most recently minimized client.
['M-S-x'] = cmd.client.unminimize,
-- Session.
-- Lock the screen.
['M-BackSpace'] = cmd.session.lock,
-- Increase screen brightness.
['M-Up'] = cmd.session.brightness.inc,
-- Decrease screen brightness.
['M-Down'] = cmd.session.brightness.dec,
-- Audio.
-- Decrease audio volume.
['XF86AudioLowerVolume'] = cmd.audio.volume.dec,
-- Increase audio volume.
['XF86AudioRaiseVolume'] = cmd.audio.volume.inc,
-- Toggle audio muted state.
['XF86AudioMute'] = cmd.audio.mute.toggle,
-- Pomodoro.
-- Start/pause timer.
['M-t'] = cmd.pomodoro.toggle,
-- Stop timer.
['M-S-t'] = cmd.pomodoro.stop,
-- Restart timer.
['M-S-r'] = cmd.pomodoro.restart,
-- Screenshot.
-- Take a screenshot, saved by default to `~/screenshots`.
['Print'] = cmd.screenshot.take,
-- Take a screenshot of the specified region.
['S-Print'] = cmd.screenshot.take_region,
-- Window manager.
-- Restart dovetail.
['M-C-r'] = cmd.wm.restart,
-- Quit dovetail.
['M-C-q'] = cmd.wm.quit,
-- System.
-- Power off the system.
['M-C-minus'] = cmd.system.poweroff,
-- Suspend the system.
['M-C-equal'] = cmd.system.suspend,
-- Misc.
-- Hide the mouse pointer.
['M-m'] = cmd.mouse.hide,
-- Close all notifications.
['M-v'] = cmd.notification.destroy_all,
}
-- Key bindings that apply only to clients.
client_keys {
-- Close the focused client.
['M-S-d'] = cmd.client.close,
-- Toggle the focused client's floating state.
['M-space'] = cmd.client.toggle_floating,
-- Toggle the focused client's fullscreen state.
['M-g'] = cmd.client.toggle_fullscreen,
-- Normalize the state of the focused client.
['M-n'] = cmd.client.normalize,
-- Minimize the focused client when a new client is launched.
['M-z'] = cmd.client.replace,
-- Minimize the focused client.
['M-x'] = cmd.client.minimize,
}
-- Mouse button bindings.
buttons {
-- Focus client under mouse pointer.
['1'] = cmd.mouse.focus,
-- Move client under mouse pointer.
['M-1'] = cmd.mouse.move,
-- Resize floating client under mouse pointer.
['M-3'] = cmd.mouse.resize,
}
-- Client rules.
rules {
{
-- Inhibit idling when a client with class 'Chromium' and name
-- 'Netflix' has focus.
rule = {class = 'Chromium'},
names = 'Netflix',
inhibit = true,
},
}