feat(config): add smart-move corner floats, pip toggle, and floating YouTube

This commit is contained in:
Prad Nukala committed 2026-09-22 10:42:20 -04:00
1 parent c81271b10b
commit d1c676ca00
2 files changed
+44 -21

No files matched your search

+21 -8
View File
@@ -57,14 +57,27 @@ o.window([[^kitty-herdr$]], { workspace = "special:scratchpad silent" })
-- focused monitor.
o.window([[^com\.fastmail\.Fastmail$]], { workspace = "special:fastmail silent" })
o.window([[^Beeper$]], { workspace = "special:beeper silent" })
-- SUPER + CTRL + ALT + Y / SUPER + SHIFT + Y: the YouTube web app. Chromium
-- derives the class from the app URL and the host spelling has varied
-- (youtube.com vs www.youtube.com) once a video plays, so match the family.
-- Its picture-in-picture overlay shares the class; the "negative:" title
-- match keeps it out so Omarchy's pip rule (float + pin) still applies.
-- Rule regexes are RE2 full matches: no lookahead, and a pattern must cover
-- the whole string.
-- SUPER + CTRL + ALT + Y / SUPER + SHIFT + Y: the YouTube web app, summoned
-- by ~/.local/bin/omarchy-summon. Not a scratch workspace: a floating,
-- pinned window parked in the bottom-left corner at 30% of the monitor on
-- both axes, inset by general:gaps_out -- the same fit ~/.local/bin/omarchy-pip
-- applies (SUPER + SHIFT + T, and the summon after a monitor move); keep the
-- fraction and inset in sync. Chromium derives the class from the app URL
-- and the host spelling has varied (youtube.com vs www.youtube.com) once a
-- video plays, so match the family. Its picture-in-picture overlay shares
-- the class; the "negative:" title match keeps it out so Omarchy's pip rule
-- (float + pin, top right) still applies. Rule regexes are RE2 full matches:
-- no lookahead, and a pattern must cover the whole string.
o.window(
{ class = [[brave-(www\.)?youtube\.com__.*]], title = [[negative:.*Picture.?in.?[Pp]icture.*]] },
{ workspace = "special:youtube silent" }
{
float = true,
pin = true,
size = { "(monitor_w*0.3)", "(monitor_h*0.3)" },
-- Spelled from monitor_h, not window_h: move is evaluated against the
-- size Chromium asked for, not the one the size rule imposes, and that
-- put the window top-left.
move = { "10", "(monitor_h*0.7-10)" },
}
)