Use the helpers where applicable

This commit is contained in:
David Heinemeier Hansson
2026-05-19 22:18:13 +02:00
parent 42f03655df
commit 97d4e908af
7 changed files with 89 additions and 100 deletions
+7 -5
View File
@@ -10,8 +10,10 @@ hl.layer_rule({ match = { namespace = "^(omarchy-menu|omarchy-app-launcher|omarc
-- Bar settings floats centered with a sensible default size instead of
-- tiling — it's a transient dialog, not a workspace surface.
hl.window_rule({
match = { class = "^org.quickshell$", title = "^Omarchy Bar Settings$" },
o.window({
class = "^org.quickshell$",
title = "^Omarchy Bar Settings$",
}, {
float = true,
center = true,
size = { 760, 620 },
@@ -19,9 +21,9 @@ hl.window_rule({
-- Dev gallery is the main shell workbench; open it maximized like
-- SUPER+ALT+F so component previews have the whole workspace.
hl.window_rule({ match = { class = "^org.quickshell$", title = "^Omarchy shell dev gallery$" }, maximize = true })
o.window({ class = "^org.quickshell$", title = "^Omarchy shell dev gallery$" }, { maximize = true })
-- Per-widget settings dialog opens as a smaller FloatingWindow off the
-- bar settings panel; keep it floating with its own default size.
hl.window_rule({ match = { class = "^org.quickshell$", title = "^Widget settings " }, float = true })
hl.window_rule({ match = { class = "^org.quickshell$", title = "^Widget settings " }, size = { 380, 320 } })
o.window({ class = "^org.quickshell$", title = "^Widget settings " }, { float = true })
o.window({ class = "^org.quickshell$", title = "^Widget settings " }, { size = { 380, 320 } })
+16 -25
View File
@@ -1,44 +1,35 @@
-- Floating windows.
hl.window_rule({ match = { tag = "floating-window" }, float = true })
hl.window_rule({ match = { tag = "floating-window" }, center = true })
hl.window_rule({ match = { tag = "floating-window" }, size = { 875, 600 } })
o.window({ tag = "floating-window" }, { float = true })
o.window({ tag = "floating-window" }, { center = true })
o.window({ tag = "floating-window" }, { size = { 875, 600 } })
hl.window_rule({
match = {
class = "(org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.codeberg.dnkl.foot|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv)",
},
o.window("(org.omarchy.btop|org.omarchy.terminal|org.omarchy.bash|org.codeberg.dnkl.foot|org.gnome.NautilusPreviewer|org.gnome.Evince|com.gabm.satty|Omarchy|About|TUI.float|imv|mpv)", {
tag = "+floating-window",
})
hl.window_rule({
match = {
o.window(
{
class = "(xdg-desktop-portal-gtk|sublime_text|DesktopEditors|org.gnome.Nautilus)",
title = "^(Open.*Files?|Open [F|f]older.*|Save.*Files?|Save.*As|Save|All Files|.*wants to [open|save].*|[C|c]hoose.*)",
},
tag = "+floating-window",
})
hl.window_rule({ match = { class = "org.gnome.Calculator" }, float = true })
{ tag = "+floating-window" }
)
o.window("org.gnome.Calculator", { float = true })
-- Fullscreen screensaver.
hl.window_rule({ match = { class = "org.omarchy.screensaver" }, fullscreen = true })
hl.window_rule({ match = { class = "org.omarchy.screensaver" }, float = true })
hl.window_rule({ match = { class = "org.omarchy.screensaver" }, animation = "slide" })
o.window("org.omarchy.screensaver", { fullscreen = true })
o.window("org.omarchy.screensaver", { float = true })
o.window("org.omarchy.screensaver", { animation = "slide" })
-- No transparency on media windows.
hl.window_rule({
match = {
class = "^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$",
},
o.window("^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$", {
tag = "-default-opacity",
})
hl.window_rule({
match = {
class = "^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$",
},
o.window("^(zoom|vlc|mpv|org.kde.kdenlive|com.obsproject.Studio|com.github.PintaProject.Pinta|imv|org.gnome.NautilusPreviewer)$", {
opacity = "1 1",
})
-- Popped window rounding.
hl.window_rule({ match = { tag = "pop" }, rounding = 8 })
o.window({ tag = "pop" }, { rounding = 8 })
-- Prevent idle while open.
hl.window_rule({ match = { tag = "noidle" }, idle_inhibit = "always" })
o.window({ tag = "noidle" }, { idle_inhibit = "always" })