Files
dotfiles/config/hypr/rules.lua
T
gitadmin 7b1f04b530 refactor(hypr): split monolithic config into modules
Extract monitors, functions, rules, env vars, and onstart into
separate files. Add toggle_pin, toggle_master_scrolling, and
layout-aware keybinds for scrolling layout.
2026-08-22 12:27:44 -04:00

76 lines
2.1 KiB
Lua

hl.workspace_rule({ workspace = "special:special", border_size = 3 })
hl.window_rule({
match = { class = "(blueberry.py|Impala|Wiremix|org.gnome.NautilusPreviewer|com.gabm.satty|Omarchy|About|TUI.float|org.pulseaudio.pavucontrol)" },
tag =
"+floating-window"
})
hl.window_rule({
match = { class = "terminal-pi" },
float = true,
center = true,
workspace = "special:special",
size = { "monitor_w/2", "monitor_h/2" }
})
hl.window_rule({
match = { class = "quicknotes" },
tag = "+floating-window"
})
hl.window_rule({
name = "ostt floating windows",
match = { class = "ostt-popup" },
float = true,
no_anim = true,
move = { 10, 10 },
size = { 320, 240 },
})
hl.window_rule({
match = {
class = "(xdg-desktop-portal-gtk|sublime_text|DesktopEditors)",
title = "^(Open.*Files?|Save.*Files?|Save.*As|All Files|Save)"
},
tag = "+floating-window"
})
hl.window_rule({
match = { class = "code" },
fullscreen_state = 1,
})
hl.window_rule({
-- Fix some dragging issues with XWayland
name = "fix-xwayland-drags",
match = {
class = "^$",
title = "^$",
xwayland = true,
float = true,
fullscreen = false,
pin = false,
},
no_focus = true,
})
hl.window_rule({ match = { tag = "floating-window" }, float = true, center = true, size = { "monitor_w/2", "monitor_h/2" } })
hl.window_rule({ match = { class = "(rofi|wofi)" }, tag = "+user-menu" })
hl.window_rule({ match = { class = "^(pinentry-)" }, tag = "+user-menu" })
hl.window_rule({ match = { class = "^(gcr-prompter)$" }, tag = "+user-menu" })
hl.window_rule({ match = { tag = "user-menu" }, stay_focused = true, no_anim = true, float = true, center = true, size = { "monitor_w/3", "monitor_h/3" } })
hl.window_rule({
name = "Picture in Picture windows",
match = { title = "^.*[Pp]icture[ -][Ii]n[ -][Pp]icture.*$" },
float = true,
pin = true,
rounding = 7,
opacity = "1 1",
move = { "monitor_w-window_w-10", "monitor_h-window_h-10" },
size = { "monitor_w/4", "monitor_h/4" },
})