-- Was: theme/rules.conf -- -- The old file already used the 0.53+ `windowrule { name/match:class }` block -- form, so this is a fairly direct transcription: -- match:class = -> match = { class = } -- float = on -> float = true -- center = 1 -> center = true -- size = (a) (b) -> size = { "a", "b" } -- Reusable size presets (monitor-relative expressions) local size_large = { "monitor_w*0.7", "monitor_h*0.7" } local size_mid = { "monitor_w*0.5", "monitor_h*0.5" } local size_mini = { "monitor_w*0.3", "monitor_h*0.4" } local size_side = { "monitor_w*0.3", "monitor_h*0.9" } -------------------- ---- BASE RULES ---- -------------------- hl.window_rule({ name = "center-float-large", match = { class = "^(center-float-large)$|^(.*qimgv.*)$|^(.*mpv.*)$" }, float = true, size = size_large, center = true, }) hl.window_rule({ name = "center-float", match = { class = "^(center-float)$" }, float = true, size = size_mid, center = true, }) hl.window_rule({ name = "center-float-title", match = { title = "^(.*Open Folder.*)$|^(.*Open File.*)$|^(.*Save File.*)$|^(.*Save Folder.*)$|^(.*Save Image.*)$|^(.*Save As.*)$|^(.*Open As.*)$" }, float = true, size = size_mid, center = true, }) hl.window_rule({ name = "center-float-mini", match = { class = "^(center-float-mini)$|^(.*galculator.*)$|^(.*ytdlp-gui.*)$|^(.*udiskie.*)$|^(.*Calculator.*)$" }, float = true, size = size_mini, center = true, }) ------------------------- ---- ANIMATION RULES ---- ------------------------- hl.window_rule({ name = "cava", match = { title = "^.*cava.*$" }, animation = "slide", }) hl.window_rule({ name = "wleave", match = { class = "^.*wleave.*$" }, animation = "popin", }) --------------------- ---- SCRATCHPADS ---- --------------------- hl.window_rule({ name = "scratchpad-large", match = { class = "^scratchpad-large$" }, float = true, size = size_large, center = true, animation = "slide", workspace = "special:scratchpad-large", }) hl.window_rule({ name = "scratchpad", match = { class = "^scratchpad$" }, float = true, size = size_mid, center = true, animation = "slide", workspace = "special:scratchpad", }) hl.window_rule({ name = "scratchpad-mini", match = { class = "^scratchpad-mini$" }, float = true, size = size_mini, center = true, animation = "slide", workspace = "special:scratchpad-mini", }) hl.window_rule({ name = "sideScratchpad", match = { class = "^(.*pavucontrol.*)$|(.*blueman-manager.*)$" }, float = true, size = size_side, center = true, workspace = "special:scratchpad", }) ---------------------------- ---- SPECIFIC APP RULES ---- ---------------------------- hl.window_rule({ name = "videobridge", match = { class = "^(.*xwaylandvideobridge.*)$" }, opacity = "0.0", }) hl.window_rule({ name = "zathura", match = { class = "^(.*zathura.*)$" }, float = true, size = { "monitor_w*0.35", "monitor_h*0.9" }, center = true, }) hl.window_rule({ name = "scrcpy", match = { class = "^(.*wgpsscli.*)$" }, float = true, center = true, }) hl.window_rule({ name = "agpss", match = { class = "^(-*agpss.*)$" }, tile = true, }) --------------------- ---- LAYER RULES ---- --------------------- hl.layer_rule({ name = "rofi", match = { namespace = "rofi" }, animation = "popin 80% 150ms", blur = true, }) -- NOTE: the old `layerrule { name = waybar, match:namespace = waybar }` block -- set no effects at all, so it was a no-op and is dropped here. Add e.g. -- `blur = true` if that was the intent. hl.layer_rule({ name = "swaync-notification", match = { namespace = "swaync-notification-window" }, animation = "slide", }) hl.layer_rule({ name = "swaync-control", match = { namespace = "swaync-control-center" }, animation = "slide", }) hl.layer_rule({ name = "swayosd", match = { namespace = "swayosd" }, animation = "fade", }) hl.layer_rule({ name = "selection", match = { namespace = "selection" }, animation = "fade", }) hl.layer_rule({ name = "hyprlock", match = { namespace = "hyprlock" }, animation = "fade", }) -- `animation = none` in rules.conf -> the documented no_anim effect hl.layer_rule({ name = "hyprpicker", match = { namespace = "hyprpicker" }, no_anim = true, })