awesomewm/rules.lua

182 lines
4.2 KiB
Lua
Raw Normal View History

2014-08-28 08:58:03 +00:00
local awful = require("awful")
awful.rules = require("awful.rules")
2014-08-28 08:58:03 +00:00
local beautiful = require("beautiful")
local binder = binder or require("separable.binder")
2017-09-13 17:30:10 +00:00
local log = require("talkative")
2010-06-06 02:56:07 +00:00
-- 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
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
},
2017-09-13 17:30:10 +00:00
-- log name and class of new windows for debugging purposes
callback = function(c)
2017-09-13 17:30:10 +00:00
log("-----------\nnew client\n")
if (c["name"] ~= nil) then
2017-11-20 09:24:05 +00:00
log("name: " .. c["name"])
end
if (c["class"] ~= nil) then
2017-11-20 09:24:05 +00:00
log("class: " .. c["class"])
end
2017-02-16 08:51:01 +00:00
if (c["type"] ~= nil) then
2017-11-20 09:24:05 +00:00
log("type: " .. c["type"])
2017-02-16 08:51:01 +00:00
end
end
},
2018-11-08 19:27:02 +00:00
{ rule = { class = "qutebrowser" }, properties = { tag = "2" } },
2018-09-24 07:18:09 +00:00
--{ 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}
},
2019-08-10 18:36:43 +00:00
{
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 = {
2018-03-09 15:53:28 +00:00
"pinentry", "Passprompt", "copyq"
}},
properties = { floating = true, size_hints_honor = true }
},
{
rule_any = { class = {"Pidgin"}, instance = {"Weechat"} },
properties = {
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 = {
2017-02-16 08:51:01 +00:00
screen = 1, tag = "8",
floating = false
}
},
{
rule = { class = "Eclipse", name = nil, type = "dialog" },
properties = {
screen = 2, tag = "8",
floating = false
}
},
{
rule = { class = "Eclipse", name = ".*", type = "dialog" },
properties = {
screen = 1, tag = "8",
floating = false
}
},
{
rule = { class = "Steam", name = "Friends" },
properties = {
tag = "3"
},
callback = awful.client.setmaster
},
{
rule = { class = "Steam", name = "Chat" },
properties = {
tag = "3"
},
callback = awful.client.setslave
},
{
rule = { class = "Steam", name = "Steam" },
properties = {
tag = "F1"
}
},
{
rule = { class = "Telegram" },
properties = {
tag = "3"
},
callback = awful.client.setslave
},
{
rule_any = { role ={ "conversation" }, instance = { "Weechat" } },
callback = awful.client.setslave
},
{
rule = { class = "Irssi"},
properties = {
tag = "3"
} ,
callback = awful.client.setslave
},
{
2018-11-08 19:27:02 +00:00
rule_any = { instance = {"Gmutt"}, name = {"Gmutt"} },
properties = {
2019-01-29 09:47:38 +00:00
tag = "4",
screen = 2
}
},
{
rule = { class = "Gmpc" },
properties = {
tag = "6"
}
},
{
rule = { class = "Pdfpc" },
properties = {
size_hints_honor = true,
float = true,
fullscreen = true
}
},
{
2018-09-24 07:18:09 +00:00
rule_any = { class = {"URxvt", "Alacritty", "GVim" } },
properties = {
opacity = 0.8
}
},
{
rule = { instance = "Awesomelog" },
properties = {
tag = "F4"
}
}
}