-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrules.lua
99 lines (94 loc) · 3.08 KB
/
rules.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
local awful = require "awful"
local beautiful = require "beautiful"
local client_buttons = require "bindings.client_buttons"
local client_keys = require "bindings.client_keys"
local tag_descriptions = require("components.taglist").description
local function add_centered_floating_rule(class, width, height)
if type(class) == "string" then class = { class } end
return {
rule_any = { class = class },
properties = {
ontop = true,
floating = true,
callback = function(c) require("utils").place_centered(c, width, height) end,
},
}
end
local rules = {
-- All clients will match this rule.
{
rule = {},
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = client_keys,
buttons = client_buttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
size_hints_honor = false,
},
},
-- Floating clients.
{
rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry",
},
class = {
"Gnome-calculator",
"Arandr",
"Blueman-manager",
"Gpick",
"Kruler",
"MessageWin", -- kalarm.
"Sxiv",
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
"veromix",
"xtightvncviewer",
},
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
name = {
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
-- "pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
},
},
properties = { floating = true },
},
{
rule_any = {
class = { "Zathura" },
},
properties = {
focus = true,
focusable = true,
-- switch_to_tags = true
},
},
{
rule_any = {
type = { "normal", "dialog" },
},
properties = { titlebars_enabled = false },
},
{
rule_any = {
type = { "dialog" },
},
properties = { titlebars_enabled = false, placement = awful.placement.centered },
},
add_centered_floating_rule("Dragon"),
add_centered_floating_rule("countdown", 500, 350),
add_centered_floating_rule("wifi", 400, 550),
add_centered_floating_rule({ "htop", "qutebrowser_edit", "lazydocker" }, 1000, 700),
}
return rules