mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
feat(config): enable selective blur for terminals and set flat decoration defaults
This commit is contained in:
1 parent
2288fd065e
commit
8c50abb602
2 files changed
+53
-27
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user