local classes = {
	"pavucontrol",
	"blueman-manager",
	"nm-connection-editor",
	"mpv",
	"swayimg",
	".*org.pulseaudio.pavucontrol.*",
}

local titles = {
	"Picture in Picture",
	"Friends List",
	"Save Image - *",
	"AniShio",
}

for _, class in ipairs(classes) do
	hl.window_rule({
		match = {
			class = "^" .. class .. "$",
		},
		float = true,
	})
end

for _, title in ipairs(titles) do
	hl.window_rule({
		match = {
			title = "^" .. title .. "$",
		},
		float = true,
	})
end

hl.window_rule({
	name = "fix-xwayland-drags",
	match = {
		class = "^$",
		title = "^$",
		xwayland = true,
		float = true,
		fullscreen = false,
		pin = false,
	},

	no_focus = true,
})

hl.window_rule({
	match = {
		float = false,
	},

	no_shadow = true,
})

hl.window_rule({
	match = {
		fullscreen_state_client = 2,
		fullscreen_state_internal = 2,
		class = "librewolf",
	},

	idle_inhibit = "always",
})

hl.window_rule({
	match = {
		fullscreen_state_client = 4,
		fullscreen_state_internal = 4,
		content = "game",
	},

	idle_inhibit = "always",
})

hl.layer_rule({
	match = { namespace = "ZShell-Bar" },
	blur = true,
	ignore_alpha = 0.5,
})

hl.layer_rule({
	match = { namespace = "ZShell-Auth" },
	blur = true,
	ignore_alpha = 0.5,
})
