summaryrefslogtreecommitdiff
path: root/rules.lua
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2024-10-18 21:49:17 -0500
committerTim Keller <tjk@tjkeller.xyz>2024-10-18 21:49:17 -0500
commit923eb46350b1102749eb05cd2120c96cc6a715d0 (patch)
tree811da20b4195d4b5c65c8ac0090982a4a23f6a7d /rules.lua
downloadawesome-923eb46350b1102749eb05cd2120c96cc6a715d0.tar.xz
awesome-923eb46350b1102749eb05cd2120c96cc6a715d0.zip
initial commit
Diffstat (limited to 'rules.lua')
-rw-r--r--rules.lua56
1 files changed, 56 insertions, 0 deletions
diff --git a/rules.lua b/rules.lua
new file mode 100644
index 0000000..8655541
--- /dev/null
+++ b/rules.lua
@@ -0,0 +1,56 @@
+local awful = require("awful")
+local beautiful = require("beautiful")
+
+-- Rules to apply to new clients (through the "manage" signal)
+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,
+ keys = clientkeys,
+ buttons = clientbuttons,
+ screen = awful.screen.preferred,
+ placement = awful.placement.no_overlap+awful.placement.no_offscreen,
+ prevent_kill = false,
+ }
+ },
+ -- Warp cursor
+ {
+ rule_any = { class = {
+ "Chromium-browser",
+ "Firefox",
+ "Firefox-esr",
+ "Gimp",
+ "KeePassXC",
+ "Pcmanfm",
+ }},
+ properties = { warp_cursor = true, }
+ },
+ -- KeePassXC rules
+ {
+ rule = { class = "KeePassXC" },
+ -- except = { name = "Unlock Database - KeePassXC" }, -- Not needed
+ properties = {
+ new_tag = {
+ name = "KeePassXC",
+ layout = awful.layout.suit.max,
+ volatile = true,
+ },
+ -- callback = function(c) c.first_tag.icon = c.icon end
+ }
+ },
+ {
+ rule_any = { name = { "Unlock Database - KeePassXC", "KeePassXC - Browser Access Request" } },
+ properties = {
+ screen = awful.screen.focused(),
+ floating = true,
+ placement = awful.placement.centered,
+ -- tags = awful.screen.focused().selected_tags, -- For some reason, this doesn't work
+ callback = function(c) c:tags(awful.screen.focused().selected_tags) end -- But this does
+ }
+ },
+}