dotfiles/.config/awesome/main/rules.lua

79 lines
1.6 KiB
Lua
Raw Normal View History

2024-02-19 19:41:33 -08:00
local awful = require("awful")
local ruled = require("ruled")
2024-02-17 17:14:20 -08:00
local dpi = require("beautiful.xresources").apply_dpi
2024-02-19 19:41:33 -08:00
local helpers = require("helpers")
local config = require("config")
2024-02-17 17:14:20 -08:00
ruled.client.connect_signal("request::rules", function()
2024-02-19 19:41:33 -08:00
ruled.client.append_rule({
id = "global",
rule = {},
properties = {
focus = awful.client.focus.filter,
raise = true,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap + awful.placement.no_offscreen,
},
})
ruled.client.append_rule({
id = "titlebars",
rule_any = {
type = { "normal", "dialog" },
},
properties = {
2024-03-03 14:27:42 -08:00
titlebars_enabled = false,
2024-02-19 19:41:33 -08:00
},
})
2024-02-17 17:14:20 -08:00
2024-02-19 19:41:33 -08:00
ruled.client.append_rule({
rule = { class = config.apps.launcher },
2024-02-19 19:41:33 -08:00
properties = {
titlebars_enabled = false,
},
})
2024-02-17 17:14:20 -08:00
2024-02-19 19:41:33 -08:00
ruled.client.append_rule({
rule = { instance = "origin.exe" },
properties = {
floating = true,
titlebars_enabled = false,
shape = helpers.ui.rrect(0),
border_width = dpi(0),
},
})
2024-02-17 17:14:20 -08:00
2024-02-19 19:41:33 -08:00
ruled.client.append_rule({
rule = { instance = "bf1.exe" },
2024-02-24 11:14:40 -08:00
properties = { shape = helpers.ui.rrect(0), fullscreen = true, tag = "󰍹", switchtotag = true },
2024-02-19 19:41:33 -08:00
})
ruled.client.append_rule({
rule = { instance = "wine" },
properties = { shape = helpers.ui.rrect(0), titlebars_enabled = false },
})
2024-02-17 17:14:20 -08:00
2024-02-19 19:41:33 -08:00
ruled.client.append_rule({
rule_any = {
floating = true,
},
properties = {
placement = awful.placement.centered,
ontop = true,
},
})
2024-02-17 17:14:20 -08:00
2024-02-19 19:41:33 -08:00
ruled.client.append_rule({
rule_any = {
class = {
"xfce",
},
instance = {
"xfce",
},
},
properties = {
floating = true,
},
})
2024-02-17 17:14:20 -08:00
end)