From 8c50abb60287ab272bb87a11d8780a3b7741d28e Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Fri, 4 Sep 2026 13:39:36 -0400 Subject: [PATCH] feat(config): enable selective blur for terminals and set flat decoration defaults --- dot_config/hypr/looknfeel.lua | 65 +++++++++++++++++++++++++---------- dot_config/kitty/kitty.conf | 15 ++++---- 2 files changed, 53 insertions(+), 27 deletions(-) diff --git a/dot_config/hypr/looknfeel.lua b/dot_config/hypr/looknfeel.lua index 889ef95..c425ac2 100644 --- a/dot_config/hypr/looknfeel.lua +++ b/dot_config/hypr/looknfeel.lua @@ -5,26 +5,44 @@ -- last writer and wins over the theme. That is the point of this file: a theme -- picks colours, the compositor's feel stays ours. --- Omarchy 4's decoration defaults, pinned explicitly. +-- Flat by default, glass for terminals only. -- --- Stock quattro is flat and cheap: rounding 0, blur off, shadow off --- ($OMARCHY_PATH/default/hypr/looknfeel.lua). Most third-party themes ship a --- hyprland.lua that turns glass on instead -- Cyberdream and Spectra both did -- --- and on this box that is a bad trade: blur at size 6 / 3 passes over an eDP --- panel plus a 5K Studio Display is real frame time on an iGPU sharing system --- memory, and rounded corners plus per-window opacity make the Chromium and --- Electron surfaces (which cannot paint a transparent background themselves) --- show wallpaper where page background should be. +-- Stock quattro is rounding 0, blur off, shadow off +-- ($OMARCHY_PATH/default/hypr/looknfeel.lua); themes that ship a hyprland.lua +-- turn all three on for every window (Cyberdream and Spectra both did), which +-- on this box is a bad trade: blur over an eDP panel plus a 5K Studio Display +-- is real frame time on an iGPU sharing system memory, and Chromium/Electron +-- windows cannot paint a transparent background, so fading them just shows +-- wallpaper where page background should be. -- --- Turning blur off globally also neutralises any layer_rule blur a theme adds --- for the Quickshell surfaces: a layer rule cannot blur while --- decoration:blur:enabled is false. +-- Blur has to be enabled globally to exist at all -- there is no positive +-- `blur` window rule, only `no_blur`, and kitty's own `background_blur` (the +-- ext-background-effect-v1 protocol, which Hyprland 0.56 does implement) is a +-- no-op while decoration:blur:enabled is false. So: switch it on here, then +-- opt every window out again except the terminals below. hl.config({ + general = { + -- Master instead of Omarchy's dwindle. Per-workspace layouts saved by + -- omarchy-hyprland-workspace-layout-toggle (~/.local/state/omarchy/ + -- workspace-layouts/*.lua) still win for the workspaces they name. + layout = "master", + }, + decoration = { rounding = 0, blur = { - enabled = false, + enabled = true, + -- Cheaper than the themes' size 6 / 3 passes; with only terminals + -- blurred this is a handful of quads per frame, not the whole screen. + size = 5, + passes = 2, + brightness = 0.8, + contrast = 1.1, + vibrancy = 0.15, + noise = 0.01, + new_optimizations = true, + popups = false, }, shadow = { @@ -40,12 +58,21 @@ hl.config({ }, }) --- Omarchy tags every mapped window `default-opacity` and fades it with this --- rule; themes re-issue it with deeper values (Cyberdream used 0.98 / 0.92). --- Window rules are last-match-wins, so restating the default here puts every --- window that did not explicitly opt out of the tag back on stock fade. --- Terminals keep their own alpha (kitty's `background_opacity`) on top of it. -o.window({ tag = "default-opacity" }, { opacity = "0.985 0.96" }) +-- Omarchy tags every mapped window `default-opacity` and fades it to +-- 0.985 / 0.96; themes deepen that (Cyberdream used 0.98 / 0.92). Rules are +-- last-match-wins, so this pins every window opaque and blur-free. An opaque +-- window has nothing visible behind it, so the pass above never runs for it. +o.window({ tag = "default-opacity" }, { opacity = "1.0 1.0", no_blur = true }) + +-- The exception: terminals carry their own alpha (kitty's +-- `background_opacity`, 0.9 in ~/.config/kitty/kitty.conf), so they are the one +-- surface where blurring the backdrop buys anything. Full class list because +-- the kitty hosts run under their own app-ids (kitty-herdr, kitty-tmux, +-- kitty-goliath) and Omarchy tags nothing as `terminal`. +o.window( + "^(kitty(-.*)?|Alacritty|com\\.mitchellh\\.ghostty|foot|org\\.codeberg\\.dnkl\\.foot|wezterm)$", + { no_blur = false } +) -- Themes are also free to re-enable the workspace slide (Spectra sets -- `workspaces` with its "flow" bezier); Omarchy's default is off. Restate it. diff --git a/dot_config/kitty/kitty.conf b/dot_config/kitty/kitty.conf index e4f6058..3f42f67 100644 --- a/dot_config/kitty/kitty.conf +++ b/dot_config/kitty/kitty.conf @@ -4,15 +4,14 @@ bold_italic_font auto window_padding_width 8 hide_window_decorations yes # Transparency: kitty's own alpha, not the compositor's -- Hyprland fades a -# window uniformly (chrome included), kitty only makes the cell background -# translucent, so text stays fully opaque on top of it. +# whole window (chrome included), kitty only makes the cell background +# translucent, so text stays fully opaque on top of it. This alpha is also what +# makes kitty the one window Hyprland blurs: hypr/looknfeel.lua enables blur +# globally and then opts every window out except the terminal classes, and an +# opaque window has no backdrop to blur. kitty's own `background_blur` does +# nothing here -- it rides ext-background-effect-v1, which Hyprland ignores +# while decoration:blur:enabled is false, and is redundant once it is true. background_opacity 0.9 -# Per-window blur without global blur. Hyprland 0.56 implements the staging -# protocol ext-background-effect-v1 and kitty's Wayland backend speaks it, so -# kitty asks the compositor to blur the region behind its own surface. That is -# why hypr/looknfeel.lua can keep decoration:blur:enabled = false: nothing else -# on screen pays for the blur pass. Needs background_opacity < 1. -background_blur 1 cursor_blink_interval 1 copy_on_select auto strip_trailing_spaces smart