-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrules.lua
More file actions
209 lines (206 loc) · 5.23 KB
/
Copy pathrules.lua
File metadata and controls
209 lines (206 loc) · 5.23 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
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
local awful = require("awful")
awful.rules = require("awful.rules")
local localconf = require("localconf")
local beautiful = require("beautiful")
local binder = binder or require("separable.binder")
local log = require("talkative")
-- create a notification when given client becomes urgent
local function popup_urgent(client, message)
client:connect_signal("property::urgent", function (c)
if c.urgent and not c.focus then
naughty.notify({ text=message })
end
end)
end
if not localconf.screen then
localconf.screen = {}
end
local screen_main = math.min(localconf.screen.main or 1, screen.count())
local screen_chat = math.min(localconf.screen.chat or screen.count(), screen.count())
local screen_mail = math.min(localconf.screen.mail or screen.count(), screen.count())
print("Screens: main: ".. screen_main .. ", chat: ".. screen_chat .. ", mail: " .. screen_mail)
awful.rules.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,
minimized = false,
size_hints_honor = false,
keys = binder.client.keys(),
buttons = binder.client.buttons(),
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
},
-- log name and class of new windows for debugging purposes
callback = function(c)
log("-----------\nnew client\n")
if (c["name"] ~= nil) then
log("name: " .. c["name"])
end
if (c["class"] ~= nil) then
log("class: " .. c["class"])
end
if (c["type"] ~= nil) then
log("type: " .. c["type"])
end
if (c["instance"] ~= nil) then
log("instance: " .. c["instance"])
end
end
},
{ rule = { class = "qutebrowser" }, properties = { tag = "2" } },
--{ rule = { name = "", class = "jetbrains-idea", type = "dialog" },
-- properties = { placement = false },
-- callback = function(c)
-- c:connect_signal("unfocus", function() client.focus = c end)
-- end
--},
{
rule = { class = "Passprompt" },
properties = { ontop = true, focus = true}
},
{
rule = { class = "Dragon" },
properties = { ontop = true, sticky = true}
},
{
rule = { class = "Sm" },
properties = {
floating = true,
size_hints_honor = true,
-- --ontop = true,
fullscreen = true,
-- border_width = 0
}
},
{
rule_any = { class = {
"pinentry", "Passprompt", "copyq"
}},
properties = { floating = true, size_hints_honor = true }
},
{
rule_any = { class = {"Pidgin"}, instance = {"Weechat"}, name = {"Weechat"}},
properties = {
screen = chat, tag = "3", opacity = 0.8
},
callback = function(c) popup_urgent(c, "new chat message") end
},
{
rule = { role = "buddy_list" },
callback = awful.client.setmaster
},
{
rule = { class = "Eclipse" },
properties = {
screen = 1, tag = "8",
floating = false
}
},
{
rule = { class = "Eclipse", name = ".*", type = "dialog" },
properties = {
screen = 1, tag = "8",
floating = false
}
},
{
rule = { class = "Steam", name = "Friends" },
properties = {
screen = screen_chat, tag = "3"
},
callback = awful.client.setmaster
},
{
rule = { class = "Steam", name = "Chat" },
properties = {
screen = screen_chat, tag = "3"
},
callback = awful.client.setslave
},
{
rule = { class = "Steam", name = "Steam" },
properties = {
tag = "F1"
}
},
{
rule = { class = "rocketchat" },
properties = {
screen = screen_chat, tag = "5"
}
},
{
rule = { class = "Telegram" },
except = { name = "Media viewer" },
properties = {
screen = screen_chat, tag = "3"
},
callback = awful.client.setslave
},
{
rule = { class = "Telegram", name = "Media viewer" },
properties = {
fullscreen = true
},
},
{
rule_any = { role ={ "conversation" }, instance = { "Weechat" } },
callback = awful.client.setslave
},
{
rule = { class = "Irssi"},
properties = {
tag = "3"
} ,
callback = awful.client.setslave
},
{
rule_any = { instance = {"Gmutt"}, name = {"Gmutt"} },
properties = {
tag = "4",
screen = screen_mail
}
},
{
rule = { class = "Gmpc" },
properties = {
tag = "6"
}
},
{
rule = { class = "Pdfpc" },
properties = {
size_hints_honor = true,
float = true,
fullscreen = true
}
},
{
rule_any = { class = {"URxvt", "Alacritty", "GVim" } },
properties = {
opacity = 0.8
}
},
{
rule = { name = "Awesomelog" },
properties = {
tag = "F4"
}
},
{
rule = { class = "Dragon" },
properties = {
sticky = true,
ontop = true
}
},
{
rule = { class = "adobe dng converter.exe" },
properties = { floating = true, size_hints_honor = true }
}
}