refactor code structure
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
-- Window rules are kept as data and registered in order at the bottom. This
|
||||
-- makes adding a rule independent from the registration mechanism.
|
||||
local rules = {
|
||||
-- Render terminal image previews as undecorated, non-focusing overlays.
|
||||
{
|
||||
name = "ueberzugpp-preview",
|
||||
match = {
|
||||
class = "ueberzugpp_.*",
|
||||
},
|
||||
float = true,
|
||||
no_initial_focus = true,
|
||||
border_size = 0,
|
||||
rounding = 0,
|
||||
no_shadow = true,
|
||||
},
|
||||
-- Ignore application requests to maximize themselves.
|
||||
{
|
||||
name = "suppress-maximize-events",
|
||||
match = {
|
||||
class = ".*",
|
||||
},
|
||||
suppress_event = "maximize",
|
||||
},
|
||||
-- Prevent empty XWayland drag helper windows from stealing focus.
|
||||
{
|
||||
name = "fix-xwayland-drags",
|
||||
match = {
|
||||
class = "^$",
|
||||
title = "^$",
|
||||
xwayland = true,
|
||||
float = true,
|
||||
fullscreen = false,
|
||||
pin = false,
|
||||
},
|
||||
no_focus = true,
|
||||
},
|
||||
-- Place the Hyprland runner near the lower-left edge as a floating window.
|
||||
{
|
||||
name = "move-hyprland-run",
|
||||
match = {
|
||||
class = "hyprland-run",
|
||||
},
|
||||
move = "20 monitor_h-120",
|
||||
float = true,
|
||||
},
|
||||
}
|
||||
|
||||
-- Register every declarative rule with Hyprland.
|
||||
for _, rule in ipairs(rules) do
|
||||
hl.window_rule(rule)
|
||||
end
|
||||
Reference in New Issue
Block a user