Files
AwesomeWM-Config/main/rules.lua

94 lines
1.5 KiB
Lua

local awful = require("awful")
local beautiful = require("beautiful")
local _M = {}
function _M.get(clientkeys, clientbuttons)
local _R = {
{
rule = {},
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
titlebars_enabled = false,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
},
},
-- Floating clients.
{
rule_any = {
instance = {
"DTA",
"copyq",
"pinentry",
},
class = {
"Arandr",
"Blueman-manager",
"Gpick",
"Kruler",
"MessageWin",
"Sxiv",
"Tor Browser",
"Wpa_gui",
"veromix",
"xtightvncviewer",
},
name = {
"Event Tester",
},
role = {
"AlarmWindow",
"ConfigManager",
"pop-up",
},
},
properties = {
floating = true,
},
},
-- Add titlebars to normal clients and dialogs
{
rule_any = {
type = { "normal", "dialog" },
},
properties = {
titlebars_enabled = true,
},
},
{
rule = { class = "Firefox" },
properties = {
screen = 1,
tag = RC.tags[2],
titlebars_enabled = false,
},
},
{
rule = { class = "Discord" },
properties = {
screen = 1,
tag = RC.tags[6],
titlebars_enabled = false,
},
},
}
return _R
end
return setmetatable({}, {
__call = function(_, ...)
return _M.get(...)
end,
})