128 lines
3.6 KiB
Lua
128 lines
3.6 KiB
Lua
-- Window, layer and workspace rules.
|
|
|
|
-- Ignore maximize requests from all apps.
|
|
hl.window_rule({
|
|
name = "suppress-maximize-events",
|
|
match = { class = ".*" },
|
|
|
|
suppress_event = "maximize",
|
|
})
|
|
|
|
-- Fix some dragging issues with XWayland.
|
|
hl.window_rule({
|
|
name = "fix-xwayland-drags",
|
|
match = {
|
|
class = "^$",
|
|
title = "^$",
|
|
xwayland = true,
|
|
float = true,
|
|
fullscreen = false,
|
|
pin = false,
|
|
},
|
|
|
|
no_focus = true,
|
|
})
|
|
|
|
-- Hyprland-run windowrule.
|
|
hl.window_rule({
|
|
name = "move-hyprland-run",
|
|
match = { class = "hyprland-run" },
|
|
|
|
move = "20 monitor_h-120",
|
|
float = true,
|
|
})
|
|
|
|
-- Anything fullscreen keeps the screen awake (video players, games, browsers).
|
|
hl.window_rule({
|
|
name = "idle-inhibit-fullscreen",
|
|
match = { class = ".*" },
|
|
|
|
idle_inhibit = "fullscreen",
|
|
})
|
|
|
|
------------------
|
|
---- NOCTALIA ----
|
|
------------------
|
|
|
|
-- Settings window floats at a comfortable size.
|
|
hl.window_rule({
|
|
name = "noctalia-settings",
|
|
match = { class = "dev.noctalia.Noctalia" },
|
|
|
|
float = true,
|
|
size = { 1080, 920 },
|
|
})
|
|
|
|
-- Blur behind the bar, panels, dock and notifications; Hyprland's own layer
|
|
-- animations are off so they do not fight Noctalia's.
|
|
hl.layer_rule({
|
|
name = "noctalia",
|
|
match = {
|
|
namespace = "^noctalia-(bar-.+|notification|dock|panel|attached-panel|osd|window-switcher)$",
|
|
},
|
|
|
|
no_anim = true,
|
|
ignore_alpha = 0.5,
|
|
blur = true,
|
|
blur_popups = true,
|
|
})
|
|
|
|
----------------
|
|
---- GAMING ----
|
|
----------------
|
|
|
|
-- Steam Big Picture games (steam_app_<id>) may tear for lower input latency.
|
|
-- This only takes effect in fullscreen with general.allow_tearing enabled.
|
|
hl.window_rule({
|
|
name = "steam-games-tearing",
|
|
match = { class = "^steam_app_\\d+$" },
|
|
|
|
immediate = true,
|
|
})
|
|
|
|
-- Steam's small utility windows.
|
|
hl.window_rule({
|
|
name = "steam-utility-windows",
|
|
match = { class = "^steam$", title = "^(Friends List|Steam Settings)$" },
|
|
|
|
float = true,
|
|
})
|
|
|
|
-- Proton games map as XWayland windows of class steam_app_<id>, but so do the
|
|
-- launchers, installers and tools that run in the same prefix (Paradox,
|
|
-- Rockstar, EA app, Ubisoft Connect, redistributable setups, crash reporters),
|
|
-- so the class alone cannot tell them apart; the title does. Static rules run
|
|
-- once, when the window maps: a launcher that sets its title later counts as a
|
|
-- game. Native Linux Steam games do not use this class and are not covered.
|
|
local protonClass = "^steam_app_\\d+$"
|
|
local launcherTitle = "(?i).*("
|
|
.. "launch(er|ing)|setup|install|updat|redistributable|config|settings"
|
|
.. "|\\berrors?\\b|crash(ed| ?report| ?handler|pad)|eula|licen[cs]e agreement"
|
|
.. "|\\bea app\\b|ubisoft connect|\\buplay\\b|social club|battle\\.net|gog galaxy"
|
|
.. ").*"
|
|
|
|
-- Games start fullscreen. float = false skips windows Hyprland floats on its own
|
|
-- (dialogs, transient and fixed-size windows, menus, tooltips); the negated
|
|
-- title skips launchers. A game can still leave fullscreen through its own
|
|
-- settings: suppress_event is deliberately not set.
|
|
hl.window_rule({
|
|
name = "steam-games-fullscreen",
|
|
match = {
|
|
class = protonClass,
|
|
title = "negative:" .. launcherTitle,
|
|
float = false,
|
|
},
|
|
|
|
fullscreen = true,
|
|
})
|
|
|
|
-- Launchers and popups of those games float in the middle of the screen. Same
|
|
-- title regex as above, not negated, so the two rules never match one window.
|
|
hl.window_rule({
|
|
name = "steam-games-launchers",
|
|
match = { class = protonClass, title = launcherTitle },
|
|
|
|
float = true,
|
|
center = true,
|
|
})
|